C-Pointers Question and Answer

C-Pointers Question and Answer
51. Array of pointers such as int*p[5]; is used for
  • fixed row size and varying column size
  • fixed row soze and fixed folumn size
  • varying row size and fixed column size
  • varying row size and varying column size
Show Answer
52. Pointer to array such as int (*a)[8]; is used for
  • fixed row size and varying column size
  • fixed row size and fixed column size
  • varying row size and fixed column size
  • varying row size and varying column size
Show Answer
53. given float x[5][5]; float (*y)[5]; the assignment of the array x to the pointer variable y may be done as
  • y = &x;
  • y = x;
  • y [0] = x;
  • *y=x;
Show Answer
54. Given float x[5][10], *y[5]; the assignment of the array x to y is done as
  • y = x;
  • y [0] = x; y[1] = x[1]; ... ; y[4] = = x[4];
  • y[0] = x[0]; y[1] = x[1]; y[4] = x[4];
  • both options b and c
Show Answer
55. Given char *p = "ANSI C"; identify the expression returning the value C.
  • p[5]
  • *"ANSI C" +5)
  • "ANSI C"[5]
  • All the above
Show Answer
56. Given char *t[10]; identify the correct statement.
  • strcpy (t [0], "BASIC");
  • t [0] = "JAVA";
  • both options a and b
  • none of the above
Show Answer
57. Given char (*t)[10]; t = (char*)malloc(50); identify the illegal statement.
  • t [0] = "BASIC";
  • strcpy (t [4], "FORTRAN");
  • strcpy (t [0], "JAVA")
  • both options b and c
Show Answer
58. Identify the arguments of main ( ).
  • int argc
  • char *argv [ ]
  • both options a and b
  • no agruments are allowed
Show Answer
59. Which is the correct function header for function main ( )?
  • min (int argc, char *argv [ ] )
  • main (int argc, char **argv)
  • main (int argc, char *av [ ] )
  • all the above
Show Answer
60. The first arguments argc in main ( ) counts
  • The number of command line strings including the execution command
  • The number of command line strings excluding theexecution command
  • The number of lines in a program
  • The number of characters in a program
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test