C Language Interview Question and Answers

96. What are the pointer declarations used in C?
 
  • Array of pointers, e.g , int *a[10]; Array of pointers to integer
  • Pointers to an array,e.g , int (*a)[10]; Pointer to an array of into
  • Function returning a pointer,e.g, float *f( ) ; Function returning a pointer to float
  • Pointer to a pointer ,e.g, int **x; Pointer to apointer to int
  • pointer to a data type ,e.g, char *p; pointer to char
 
Your Name Your Email-ID
Your Answer
97. What is the invalid pointer arithmetic?
 
  • adding ,multiplying and dividing two pointers.
  • Shifting or masking pointer.
  • Addition of float or double to pointer
  • Assignment of a pointer of one type to a pointer of another type
 
Your Name Your Email-ID
Your Answer