Pointers Questions and Answers
Pointers questions with answers are a crucial part of C programming preparation, often included in technical interviews and MCQ-based exams. Pointers are variables that store the memory address of other variables, making them fundamental to dynamic memory management and efficient program design. These C programming MCQ questions and answers help students understand pointer arithmetic, function pointers, arrays, and memory allocation. Commonly asked in placement exams by TCS, Infosys, and Wipro, mastering pointer concepts gives you a competitive edge in coding tests and programming interviews.
Pointers
Showing 10 of
217 questions
11. A pointerr value refers to
- an integer constant
- a float value
- any valid address in memory
- any ordinary variable
12. Identify the correct declaration of pointer variables p1, p2.
- int p1, p2;
- int *p1, p2;
- int p1, *p2;
- int *p1, *p2;
13. the operators exclusively used in connection with pointers are
- *and /
- & and *
- & and |
- - and >
14. Identify the invalid expression for given register int r = 10;
- r = 20
- &r
- r + 15
- r/10
16. Identify the wrong declaration statement.
- int *p, a=10
- int a=10, *p = &a;
- int *p = &a, a=10;
- options a and b
17. Identify the invalid expression given int num = 15, *p = #
- *num
- * (&num)
- *&*num
- **&p
18. Identify the invalid expression for given float x = 2.14, * y = &x;
- &y
- *&x
- **&y
- (*&)x
19. the operand of the address of operator is
- a constant
- an expression
- a named region of storage
- a register variable
20. How does compiler differentiate address of operator from bitwise AND operator ?
- by using the number of operands and position of operands
- by seeing the declarations
- both options a and b
- by using the value of the operand