Pointers – Multiple Choice Questions (MCQs)
-
-
50. What is a constant pointer to a constant integer in C?
-
51. How do you declare a constant pointer to a constant integer in C?
-
52. What is the purpose of using pointers with structures in C?
-
53. Which operator is used to access members of a structure through a pointer in C?
-
54. If `struct Point { int x, y; }; struct Point p = {10, 20}; struct Point *ptr = &p;`, how do you access the 'x' member using the pointer?
-
55. What is the output of the following code? `struct Data { int val; }; struct Data d = {5}; struct Data *ptr = &d; ptr->val = 12; printf(\%d\"",d.val);`"""