Pointers Questions and Answers

Take Exam

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

31. The number of arguments used in malloc ( ) is

  • 0
  • 1
  • 2
  • 3
Show Answer Report

32. The number of arguments used in calloc ( ) is

  • 0
  • 1
  • 2
  • 3
Show Answer Report

33. The number of arguments used in realloc ( ) is

  • 0
  • 1
  • 2
  • 3
Show Answer Report

34. The function used for dynamic deallocation of memory is

  • destroy ( )
  • delete ()
  • free ()
  • remove ()
Show Answer Report

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 Report

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 Report

37. The pointers can be used to achieve

  • call by function
  • call by reference
  • call by name
  • call by procedure
Show Answer Report

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 Report

39. Identify the invalid expression for given syntax: float fnum [10], *fptr = fnum;

  • fjum + 4
  • fptr[4]
  • fnum=++fptr
  • &fnum[4]
Show Answer Report

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 Report
Questions and Answers for Competitive Exams Various Entrance Test