--:--









Quiz for Pointers and arrays

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



Logo

Q1: Which of the following correctly declares a pointer to an array of integers in C?

Logo

Q2: If arr is an array, what does arr represent in expressions?

Logo

Q3: Which operator is used for pointer arithmetic with arrays?

Logo

Q4: What will *(arr + 2) access in an int array arr?

Logo

Q5: What is the relationship between array indexing and pointers?

Logo

Q6: If int arr[5]; int *p = arr; then p[3] is equivalent to?

Logo

Q7: What will happen if you increment a pointer to an int?

Logo

Q8: Which function parameter declaration allows modification of the original array?

Logo

Q9: How do you dynamically allocate an array of 10 ints?

Logo

Q10: What is the output type of the expression &arr[0]?

Logo

Q11: Which of these is NOT valid for accessing array elements via pointers?

Logo

Q12: When passing a 2D array to a function, which declaration is correct?

Logo

Q13: Which statement about arrays and pointers is false?

Logo

Q14: If int arr[5] = {1,2,3,4,5}; then *(arr + 4) = ?

Logo

Q15: Can a pointer to an array be incremented?

Logo

Q16: Which of these points to the second element of arr?

Logo

Q17: What happens when you assign an array name to a pointer?

Logo

Q18: Which syntax is correct for pointer to an array of 10 integers?

Logo

Q19: If p is a pointer to an array, how to access the third element?

Logo

Q20: Which operation is illegal on array names?

Are you ready to start test? Set your time limit