C Programming Questions & Answers: part3



Software Programming : C Programming QUESTIONS AND ANSWERS :: part3 : 11 to 15

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

11.Consider the following program fragment, and choose the correct one main( ) { int a, b = 2, c; a = 2 * (b++); c = 2 * (++b); }

a = 4, c = 8
a = 3, c = 8
b = 3, c = 6
a = 4, c = 6
b = 4, c = 6.

12.Which of the following statements are true after execution of the program. #62. Which of the following statements are true after execution of the program. int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++;

a[1] = 3
a[0] = 2
a[1] = 2
compilation error
a[0] = 3.

13.What is the return value of the following statement if it is placed in C program? strcmp (�ABC�,�ABC�);

33
-1
1
Compilation error
0.

14.If the following code is executed then what is the value of the variable HI? main( ) { int HI, L, B; L = B = 2; HI = ( L == B ) ? 1 : 0; }

0
2
1
Run time Error
Compile time error.

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
The only place where success comes before work is in the dictionary.- Vidal Sassoon