C Languages Interview Questions

37. What is null pointer in C?
  Null pointer is a pointer which is pointing to nothing. Null pointer points to empty location in memory.
Value of null pointer is 0. We can make a pointer to point to null as below.
int * p = NULL;
char * p = NULL;
 
Your Name Your Email-ID
Your Answer
38. Can array subscripts have negative value in C?
  No. Array subscripts should not have negative value. Always, it should be positive.
 
Your Name Your Email-ID
Your Answer
39. What is the difference between= and== operator?
  Where = is an assignment operator and == is a relational operator.
Example:
while (i=5) is an infinite loop because it is a non zero value and
while (i==5) is true only when i=5.
 
Your Name Your Email-ID
Your Answer
40. What will happen when you access the array more than its dimension?
  When you access the array more than its dimensions some garbage value is stored in the array.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 10 of 15