Can you help me out to understand why I'm getting this output.
#include<stdio.h>
#include<string.h>
void main() {
char a[] = "Hello World";
char *p;
p=a;
printf("%d%d%d%d",sizeof(a),sizeof(p),strlen(a),strlen(p));
}
output: 1281111 (My OS is of 64-bits)
Saying that the above code should have shown 1241111(output) if It is compiled and ran on a 32-bit system. Due to 64-bit It shows 1281111.
In my First year, I saw this question and when I went to look for the output, I get 1281111.
But surprisingly above code's output has two options:1)12121111 and 2)1221111.(University Question).