0

Can someone explain output of this code?

#include<stdio.h> Main(){ char *p="helloworld"; Printf("%c",*&*p); return0;}

8th Aug 2020, 5:27 PM
RuntimeERROR
RuntimeERROR - avatar
3 odpowiedzi
+ 1
You should correct some mistakes in your code. https://code.sololearn.com/c40DZT4g6oU6/?ref=app *p is a pointer *p is pointing to start, "h" "(p+1) is pointing to next, "e" and so on..
8th Aug 2020, 5:33 PM
Gordon
Gordon - avatar
0
https://code.sololearn.com/c1mwL6wGmr39/?ref=app But the output of my code came out Tobe 'h'...
8th Aug 2020, 5:40 PM
RuntimeERROR
RuntimeERROR - avatar