C- Typedef Question and Answer

C- Typedef Question and Answer
1. In the following code, the P2 is Integer Pointer or Integer?

typedef int *ptr;
ptr p1, p2;
  • Integer
  • Integer pointer
  • Error in declaration
  • None of above
Show Answer
2. In the following code what is 'P'?
typedef char *charp;
const charp P;
  • P is a constant
  • P is a character constant
  • P is character type
  • None of above
Show Answer
3. What is x in the following program?

#include<stdio.h>

int main()
{
    typedef char (*(*arrfptr[3])())[10];
    arrfptr x;
    return 0;
}
  • x is a pointer
  • x is an array of three pointer
  • x is an array of three function pointers
  • Error in x declaration
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test