Which of the following is the correct output for the program given below?
include<stdio.h>
include<string.h>
int main()
{
static char s[] ="Hello!"; printf("%d\n",*(s + strlen(s))); return 0;
}
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
C strings always end with ascii code 0. So on s + strlen(s) place of any s we find 0.