what does if(p) and if(q) means?
void main()
{
char *p = NULL;
char *q = 0;
if(p)
printf("p");
else
printf("nullp");
if(q)
printf("q");
else
printf(" nullq");
}
Solution(By Examveda Team)
The Output of the above question is nullp nullq. AndIf(p) and if(q) check the whether p and q are true. In the given program both p and q initialize as null and zero which means false. Therefore else statement has execute.
Related User Ask Questions
Which of the following is not a primary function of a Bank?
A. Granting Loans
B. Collecting Cheques/Drafts customers
C. Facilitating import of goods
D. Issuing Bank Drafts
A. Regulatory jurisdictional fight between SEBI and IRDA
B. They don’t offer better tax benefits
C. They offer lesser returns compared to traditional insurance policies
D. All of the above
The Chameli Devi Jain Award is given for an outstanding woman ____?
A. Scientist
B. Reporter
C. Player
D. Teacher
Join The Discussion