?
Determine output:
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");
}
#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");
}
Answer & Solution
Correct Answer:
Option
D
char *p = NULL is same as char *q = 0.
In both declarations p and q are initialized to null.
Join the Discussion
Login to post a comment or share your explanation.
LoginIs it okay frinds???