Related Questions

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");}
What will be the error (if any) in the following C code?
#include#include#includeint main(){ char *p; *p = (char)calloc(10); strcpy(p, "HELLO"); printf("%s", p); free(p); return 0;}
Comment on the output of the following C code.
#include int main(){ char *str = "This" //Line 1 char *ptr = "Program\n"; //Line 2 str = ptr; //Line 3 printf("%s, %s\n", str, ptr); //Line 4}