Question
#include<string.h>
int main()
{
int a,b,c,d;
char *p = (char*)0;
int *q = (int*q)0;
float *r = (float*)0;
double *s = 0;
a = ( int)(p+1);
b = ( int)(q+1);
c = ( int)(r+1);
d = ( int)(s+1);
printf("%d %d %d %d",a,b,c,d);
return 0;
}
What will be output of following program?
#include<string.h>
int main()
{
int a,b,c,d;
char *p = (char*)0;
int *q = (int*q)0;
float *r = (float*)0;
double *s = 0;
a = ( int)(p+1);
b = ( int)(q+1);
c = ( int)(r+1);
d = ( int)(s+1);
printf("%d %d %d %d",a,b,c,d);
return 0;
}
Answer: Option B
Was this answer helpful ?
Address + 1 = next address
Was this answer helpful ?
More Questions on This Topic :
Question 1.
In which header file is the NULL macro defin....
Submit Solution