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
61. The arguments in main ( ) function are known as
- prgram parameters
- command line arguments
- both options a and b
- memory in-line format conversion
62. The arguments argv { } is used to
- count the number of command line arguments
- pass strings to the programs including the excecution command
- both options a and b
- pass strings to the programs excluding the excecution command
63. The argc in main ( ) is used to
- count the number of command line arguments
- pass strings to the programs
- both options a and b
- count the number of lines in a program
64. In the declaration double (*pf) ();
- pf is a pointer to a function
- pf is a function returning pointer
- pf is a pointer to array
- pf is an array of pointers.
65. In the declaration double *f( );
- f is a pointer to a function
- fi is a function returning a pointer
- f is an array of function
- f is an pointer to array
66. Identify the invalid assignment , for given int *p, x;
- p = 0
- p = 255864u;
- p = &x;
- *p = 10; /* assume valid pointer is already assigned to p*/
67. The operations that can be performed on pointers are
- addition or subtraction of a pointer and an integer
- assignment of pointer using pointer expression
- assignment of the value 0 to a pointer
- all the above
68. The invalid address arithmetic is (are 0
- adding two pointers
- multiplying two pointers
- dividing two pointers
- all the above
69. The invalid pointer arithmetic is (are )
- shifting pointers using shift operators
- addition of float or double values to printers
- both options a and b
- incrementing pointers
70. The declaration float (*f[5]) (); is
- an array of pointers to a function returning float
- pointer to an array
- function returning pointer to array
- pointer to a function returning an array of pointers to float