Halo to all,
I think I've increased my frequency of asking questions. But when I see a problem like this I've no choice but to ask.
So, here's a piece of code.
Code:
#include<stdio.h>
int main(void)
{
char p[] = "\123\xAB" ;
printf("%d",sizeof(p));
}
How does the output to this question comes out to be 3?
On a similar note, I just changed the code to
Code:
#include<stdio.h>
int main(void)
{
char p[] = "\0" ;
printf("%d",sizeof(p));
}
How does the output of this one is 2?
Thanks