RejinpaulPlacement
Search

Typedef - C Programming Questions and Answers - RejinpaulPlacement

@ : Home > C Programming > Typedef


Find us on Facebook



Follow us on Google+


Google+

1.
In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr;
ptr p1, p2;
Answer & Solution
Answer: (B) Integer pointer
Solution:
No answer description available for this question. Let us discuss.
close
2.
In the following code what is 'P'?
typedef char *charp;
const charp P;
Answer & Solution
Answer: (D) P is a constant
Solution:
No answer description available for this question. Let us discuss.
close
3.
What is x in the following program?

#include
int main()
{
typedef char (*(*arrfptr[3])())[10];
arrfptr x;
return 0;
}
Answer & Solution
Answer: (C) x is an array of three function pointers
Solution:
No answer description available for this question. Let us discuss. close
4.
What will be the output of the program?

#include
typedef struct error {int warning, err, exception;} ERROR;
int main()
{
ERROR e;
e.err=1;
printf("%d\n", e.err);
return 0;
}
Answer & Solution
Answer: (B) 1
Solution:
No answer description available for this question. Let us discuss.
close
5.
What will be the output of the program?

#include
int main()
{
typedef float f;
static f *fptr;
float fval = 90;
fptr = &fval;
printf("%f\n", *fptr);
return 0;
}
Answer & Solution
Answer: (C) 90.000000
Solution:
No answer description available for this question. Let us discuss.
close