Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q51
Array of pointers such as int*p[5]; is used for
  • A fixed row size and varying column size
  • B fixed row soze and fixed folumn size
  • C varying row size and fixed column size
  • D varying row size and varying column size
Answer: Option A
Q52
Pointer to array such as int (*a)[8]; is used for
  • A fixed row size and varying column size
  • B fixed row size and fixed column size
  • C varying row size and fixed column size
  • D varying row size and varying column size
Answer: Option C
Q53
given float x[5][5]; float (*y)[5]; the assignment of the array x to the pointer variable y may be done as
  • A y = &x;
  • B y = x;
  • C y [0] = x;
  • D *y=x;
Answer: Option B
Q54
Given float x[5][10], *y[5]; the assignment of the array x to y is done as
  • A y = x;
  • B y [0] = x; y[1] = x[1]; ... ; y[4] = = x[4];
  • C y[0] = x[0]; y[1] = x[1]; y[4] = x[4];
  • D both options b and c
Answer: Option D
Q55
Given char *p = "ANSI C"; identify the expression returning the value C.
  • A p[5]
  • B *"ANSI C" +5)
  • C "ANSI C"[5]
  • D All the above
Answer: Option D
Q56
Given char *t[10]; identify the correct statement.
  • A strcpy (t [0], "BASIC");
  • B t [0] = "JAVA";
  • C both options a and b
  • D none of the above
Answer: Option B
Q57
Given char (*t)[10]; t = (char*)malloc(50); identify the illegal statement.
  • A t [0] = "BASIC";
  • B strcpy (t [4], "FORTRAN");
  • C strcpy (t [0], "JAVA")
  • D both options b and c
Answer: Option A
Q58
Identify the arguments of main ( ).
  • A int argc
  • B char *argv [ ]
  • C both options a and b
  • D no agruments are allowed
Answer: Option C
Q59
Which is the correct function header for function main ( )?
  • A min (int argc, char *argv [ ] )
  • B main (int argc, char **argv)
  • C main (int argc, char *av [ ] )
  • D all the above
Answer: Option D
Q60
The first arguments argc in main ( ) counts
  • A The number of command line strings including the execution command
  • B The number of command line strings excluding theexecution command
  • C The number of lines in a program
  • D The number of characters in a program
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test