-
#include <stdion.h>
">
#include <string.h>
main()
{
static char a[] = “Exforsys”
printf(“%d”, *(a+ strlen(a)));
}What is the output of the following program? #include <stdion.h> #include <string.h> main() { static char a[] = “Exforsys” printf(“%d”, *(a+ strlen(a))); }
The immediate answer one might give seeing the program would be 8 which is the length of the string “Exforsys”. But the output is not that. The wondering what would be the output. It is 0. Interesting at the same time strange to see the output is it not? The output is so because the strlen() function give the length of the string and in this case gives the length of “Exforsys”...