C-Pointers Question and Answer
C-Pointers Question and Answer
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 = #
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