¡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
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
+ 1
0
If you erase the pointer, case 5 becomes wrong.
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..
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?
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)