--:--









Quiz for Pointer arithmetic

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



Logo

Q1: What is the size increment of an integer pointer when incremented by 1 in C?

Logo

Q2: If p is a char pointer pointing to address 1000, p+2 will point to?

Logo

Q3: Pointer subtraction between two pointers gives result in?

Logo

Q4: If arr is an int array, arr+3 points to?

Logo

Q5: Can you add two pointers in C?

Logo

Q6: If p is a float pointer and sizeof(float)=4, p+5 increases the address by?

Logo

Q7: Which of these is valid pointer arithmetic?

Logo

Q8: If p is an int pointer at 1000, sizeof(int)=4, p++ will be?

Logo

Q9: When subtracting two pointers, the result type is?

Logo

Q10: What happens if you add 1 to a void pointer in C?

Logo

Q11: Which operation is NOT allowed on pointers?

Logo

Q12: If q = p + n, what does n represent?

Logo

Q13: Which expression accesses the third element of array arr using pointers?

Logo

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

Logo

Q15: Pointer arithmetic depends on?

Logo

Q16: If char *p = 0x1000, p+10 points to?

Logo

Q17: Which statement is true about pointer increment?

Logo

Q18: If p and q are int pointers, p - q returns?

Logo

Q19: Adding an integer k to pointer p results in?

Logo

Q20: What is the output of sizeof(p2 - p1) if p1 and p2 are int pointers?

Are you ready to start test? Set your time limit