C Programming Questions & Answers: part7



Software Programming : C Programming QUESTIONS AND ANSWERS :: part7 : 1 to 5

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

1."My salary was increased by 15%!" Select the statement, which will EXACTLY reproduce the line of text above.

printf("\"My salary was increased by 15/%\!\"\n");
printf("My salary was increased by 15%!\n");
printf("My salary was increased by 15'%'!\n");
printf("\"My salary was increased by 15%%!\"\n");
printf("\"My salary was increased by 15'%'!\"\n");.

2.int a=10,b; b=a++ + ++a; printf("%d,%d,%d,%d",b,a++,a,++a); what will be the output when following code is executed?

12,10,11,13
22,10,11,13
22,11,11,11
12,11,11,11
22,13,13,13.

3.short testarray[4][3] = { {1}, {2,3}, {4,5,6}}; printf(�%d\n�, sizeof(testarray)); Assuming a short is two bytes long, what will be printed by the above code?

It will not compile because not enough initializers are given
6
7
12
24.

4.while ((x-1)) { ++counter; x--;} Referring to the sample code above, what value will the variable counter have when completed?

0
1
2
3
4.

5.How many union members can be initialized?

Only one member of a union at any one time
Any number of members of a union at one time
Union members can not be initialized
Only two members of a union at any one time
Only two members of a union at any time.

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
If you are not willing to risk the usual you will have to settle for the ordinary- Jim Rohn