Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q31
The number of arguments used in malloc ( ) is
  • A 0
  • B 1
  • C 2
  • D 3
Answer: Option B
Q32
The number of arguments used in calloc ( ) is
  • A 0
  • B 1
  • C 2
  • D 3
Answer: Option C
Q33
The number of arguments used in realloc ( ) is
  • A 0
  • B 1
  • C 2
  • D 3
Answer: Option C
Q34
The function used for dynamic deallocation of memory is
  • A destroy ( )
  • B delete ()
  • C free ()
  • D remove ()
Answer: Option C
Q35
The function call realloc (ptr, 0) is
  • A same as free (ptr)
  • B used to clear the values in the address represented by ptr
  • C used to set the value of ptr to be ()
  • D invalid
Answer: Option A
Q36
In the expression *cp++
  • A *cp is evaluated first and *cp is incremented by 1.
  • B *cp is evaluated first and cp is incremented by 1.
  • C cp is incremented by 1 first and * is applied.
  • D cp is incremented by 1 first and * is applied to the previous value of cp.
Answer: Option D
Q37
The pointers can be used to achieve
  • A call by function
  • B call by reference
  • C call by name
  • D call by procedure
Answer: Option B
Q38
The operators &, *, ++ and -- have
  • A same precedence level and same assoiativity
  • B same associativity and different precedence level
  • C different precedence level and different associativity
  • D different precedence level and same associativity
Answer: Option A
Q39
Identify the invalid expression for given syntax: float fnum [10], *fptr = fnum;
  • A fjum + 4
  • B fptr[4]
  • C fnum=++fptr
  • D &fnum[4]
Answer: Option C
Q40
Identify the correct statement for given expression float fnum [10];
  • A fnum is a pointer variable.
  • B fnum is a fixed address and not a variable
  • C fnum is an array variable.
  • D fnum is an address that can be modified.
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test