Can someone explain output of this code? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
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
2 Respuestas
+ 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