Unused pointer matters to code coach output😭🤔 | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Unused pointer matters to code coach output😭🤔

I was solving Extra-territorials, and I have just found that my unused pointer matters to case #5. Can anyone explain this to me??? https://www.sololearn.com/coach/51?ref=app

30th Jan 2020, 3:18 PM
전은지
전은지 - avatar
6 Respuestas
+ 1
ok, I think it's just that the input is too long for your char arrays... so if you make them like 100 characters instead of 20 it also works if you delete the pointer
31st Jan 2020, 1:27 AM
Arc
Arc - avatar
30th Jan 2020, 10:40 PM
전은지
전은지 - avatar
0
If you erase the pointer, case 5 becomes wrong.
30th Jan 2020, 3:20 PM
전은지
전은지 - avatar
0
Code coach expext the ouput exactly same as required not more not less.. For ex: Expexted is "hello" then output only "hello" not with extra blanks or extra unvisible charecters. I think warning does not count but errors matters.. Edit: You need just to reversly output the string.. You can try without pointers.. Or else post your code here..
30th Jan 2020, 3:37 PM
Jayakrishna 🇮🇳
0
전은지 sorry but other people can only see their own codes when opening the link Could you maybe copy it to code playground and send the link here?
30th Jan 2020, 6:21 PM
Arc
Arc - avatar
0
when the arrays overflow it'll cause some weird behavior because you are accessing memory that is actually used for other stuff (which in your case probably was the pointer variable)
31st Jan 2020, 1:30 AM
Arc
Arc - avatar