71. | Trace the error: void main( ) { int *b, &a; *b = 20 printf(“%d, %d”, a, *b) } |
Discuss |
Answer: (c).Syntax error
|
72. | Match the following: a. calloc( ) i. Frees previously allocated space b. free( ) ii. Modifies previously allocated space c. malloc( ) iii. Allocates space for array d. realloc( ) iv. Allocates requested size of space Codes: a b c d |
Discuss |
Answer: (a).iii i iv ii
|
73. | printf(“%c”, 100); |
Discuss |
Answer: (b).prints ASCII equivalent of 100
|
74. | The ………….. memory allocation function modifies the previous allocated space. |
Discuss |
Answer: (d).realloc( )
|
75. | The goal of operator overloading is |
Discuss |
Answer: (a).to help the user of a class
|
76. | How many of the following declarations are correct? int z = 7.0; double void = 0.000; short array [2] = {0, 1, 2}; char c = “\n”; |
Discuss |
Answer: (c).Two are correct
|
77. | Which one of the following sentences is true? |
Discuss |
Answer: (b).The body of a do … while loop is executed at least once.
|
78. | The statement print f (“ % d”, 10 ? 0 ? 5 : 1 : 12); will print |
Discuss |
Answer: (d).1
|
79. | What will be the output of the following c-code? void main ( ) { char *P = "ayqm" ; char c; c = ++*p ; printf ("%c", c); } |
Discuss |
Answer: (c).b
|
80. | Member of a class specified as …………… are accessible only to method of the class. |
Discuss |
Answer: (a).private
|