Determine output:#include void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");}
#include void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");} Determine output:
#include <stdio.h>void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");} Correct Answer nullp nullq
char *p = NULL is same as char *q = 0.
In both declarations p and q are initialized to null.
মোঃ আরিফুল ইসলাম
Feb 20, 2025