C Programming Questions & Answers: part4



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

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

1.What is the value of u1 and u2 for the following piece of code int u1, u2, v = 3, *pv; u1 = 2 *(v + 5); pv = &v; u2 = 2 *(*pv + 5 );

u1 = 16, u2 = 16
u1 = 8, u2 = 16
u1 = 16, u2 = 3
u1 = 8, u2 = 3
u1 = 16, u2 = 8.

2.Consider the following declerations enum colors{black, blue, green }; This represent

black = 0, blue = 1, green = 2
color[1]=�black�, color[2]=�blue�, color[3]=�green�
color = �black� or color = �blue� or color = �green�
black = -1, blue=0, green=1;
Syntax error.

3.What will be the output of the following program if �e� is the input to the program main( ) { int lower, upper; upper = getchar( ); upper = toupper( lower ); putchar( upper ); }

53
Nothing
e
E
Error.

4.The function sprintf( ) works like printf( ), but operates on

Data file
stderr
string
stdin
no such function in �C�.

5.If ASCII value of �x� is 120, then what is the value of the H, if #77. If ASCII value of �x� is 120, then what is the value of the H, if H = (�x� � �w� ) / 3;

1
2
4
0
3.

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Innovation distinguishes between a leader and a follower.-Steve Jobs