C-Pointers Question and Answer

C-Pointers Question and Answer
31. The number of arguments used in malloc ( ) is
  • 0
  • 1
  • 2
  • 3
Show Answer
32. The number of arguments used in calloc ( ) is
  • 0
  • 1
  • 2
  • 3
Show Answer
33. The number of arguments used in realloc ( ) is
  • 0
  • 1
  • 2
  • 3
Show Answer
34. The function used for dynamic deallocation of memory is
  • destroy ( )
  • delete ()
  • free ()
  • remove ()
Show Answer
35. The function call realloc (ptr, 0) is
  • same as free (ptr)
  • used to clear the values in the address represented by ptr
  • used to set the value of ptr to be ()
  • invalid
Show Answer
36. In the expression *cp++
  • *cp is evaluated first and *cp is incremented by 1.
  • *cp is evaluated first and cp is incremented by 1.
  • cp is incremented by 1 first and * is applied.
  • cp is incremented by 1 first and * is applied to the previous value of cp.
Show Answer
37. The pointers can be used to achieve
  • call by function
  • call by reference
  • call by name
  • call by procedure
Show Answer
38. The operators &, *, ++ and -- have
  • same precedence level and same assoiativity
  • same associativity and different precedence level
  • different precedence level and different associativity
  • different precedence level and same associativity
Show Answer
39. Identify the invalid expression for given syntax:
float fnum [10], *fptr = fnum;
  • fjum + 4
  • fptr[4]
  • fnum=++fptr
  • &fnum[4]
Show Answer
40. Identify the correct statement for given expression
float fnum [10];
  • fnum is a pointer variable.
  • fnum is a fixed address and not a variable
  • fnum is an array variable.
  • fnum is an address that can be modified.
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test