--:--









Quiz for Pointers to pointers

Course: C Language | Subject: Unit 6 | Topic: Pointers



Logo

Q1: What is a pointer to a pointer in C?

Logo

Q2: Which syntax correctly declares a pointer to a pointer to int?

Logo

Q3: If int x = 5; int *p = &x; int **pp = &p;, what does **pp return?

Logo

Q4: What is stored in a pointer to pointer variable?

Logo

Q5: Which of the following can be used to dynamically allocate a 2D array using pointers to pointers?

Logo

Q6: How to access the value pointed by a pointer to pointer?

Logo

Q7: If p2 is a pointer to p1 and p1 points to x, which gives the value of x?

Logo

Q8: Can we have a pointer to a pointer to a pointer?

Logo

Q9: What is the level of indirection in int ***ptr?

Logo

Q10: If int x=10; int *p=&x; int **pp=&p; what is the type of pp?

Logo

Q11: Which of these can be used to pass a pointer to a function to modify the original pointer?

Logo

Q12: What happens if you dereference a pointer to pointer with one * only?

Logo

Q13: What is the correct format specifier to print the address stored in a pointer to pointer?

Logo

Q14: In memory management, a pointer to pointer is mostly used for?

Logo

Q15: If int **pp; what does sizeof(pp) return?

Logo

Q16: Which of these is a valid initialization of a pointer to pointer?

Logo

Q17: What is the output? int x=3; int *p=&x; int **pp=&p; printf("%d", **pp);

Logo

Q18: What happens if a pointer to pointer is not initialized?

Logo

Q19: What is the difference between int *p and int **pp?

Logo

Q20: Which is true about pointer to pointer?

Are you ready to start test? Set your time limit