C MCQ with Answers
C MCQ with Answers 1. What will be the output of the following C code? #include <stdio.h> int main ( ) { char * p = NULL ; char * q = 0 ; if ( p ) printf ( " p " ) ; else printf ( "nullp" ) ; if ( q ) printf ( "q \n " ) ; else printf ( " nullq \n " ) ; } a) nullp nullq b) Depends on the compiler c) x nullq where x can be p or nullp depending on the value of NULL d) p q Answer: a 2. Comment on the following C statement. const int *ptr; a) You cannot change the value pointed by ptr b) You cannot change the pointer ptr itself c) You May or maynot change the value pointed by ptr d) You can change the pointer as well as the value pointed by it Answer:...