This quiz contains various questions related to pointer in C language which will test your understanding of the topic.
Question 1
What is a pointer in C?
A variable that stores the address of another variable
A variable that stores data directly
A keyword to create arrays
None of the above
Question 3
What is the output of the & operator?
Value at address
Value of variable
Address of variable
None
Question 4
What is the default value of an uninitialized local pointer?
0
NULL
Garbage Value
-1
Question 6
What does the following pointer declaration mean?
int *p;
p is an integer
p is a pointer to an integer
p is an address
p is an function
Question 8
Which of these is NOT a valid way to assign NULL to a pointer?
p = NULL;
p = '\0';
p = 0;
p = "NULL";
Question 9
What is a dangling pointer?
pointer that points to valid memory
pointer that points to NULL
pointer that points to freed memory
pointer that is initialized
Question 10
Which of the following is true about pointer arithmetic?
p++ increments the value stored
p++ moves to next memory block based on data type
p++ does nothing
p++ decreases the address
There are 20 questions to complete.