You are on page 1of 7
recorded on submission of this form. const float percent = 10.0; The line of code above iM represents O Declaration © initialization v © fxpresssion © Assignment There are basically ....... types of instruction in C. WwW O2 @4 wi O3 Os The total number of character set in C language i O5 ©: v O«6 O7 YY Given the initial value of a to be 10, what will be the 1 values of x and a after the execution of the line below? X= (++a, a++); O47 O 12,12 O 12,11 @© 1112 v Y x=++(y=4+1) +1; The values of x and y in the 1 expression above are * O 56 O75 © 7.6 vf oO 4,6 Y # include int main() { int a; float b, c; a=5; 2/2 b=2.5; ¢ = b*a; printf("%.3f", c); return 0;} What is the output of the code above? © 12.500 ve © 12.500000 O 12.5 © compilation error ~ Which of the following is not true in C programming 2/2 language? C Language demands that all variables to be used in a program O be declared before usage. C uses dynamic binding + O No two variables in the same scope can have the same name C is column sensitive Vv Y_ Which of the following is not a valid identifier in C? aval O -12.ab © surname er O A O A1234 Y #include int main() { int x=20, y=21, z=5,i;i= 2/2 x++< y>Z; printf("%d", i); return 0; } What is the output of the code above? @©° v O'1 O2 OQ 10 Which of the following is false about conversion 2/2 characters? Conversion character is a sequence of two characters which starts with % Conversion character denotes a type into which the data for input or output is to be converted Conversion characters are optional in scanf() and printf() Ss Conversion character is an execution character vw functions % # include int main() { int a=-2, b=2,c=0,d;d= 2/2 ++4a || (++b && ++¢); printf("%d %d %d %d", i,j,k,m); return 0;} From the code above, which of the following expression will never be evaluated? ++c only ++b and ++c SY ++a only 0OO0O@0 ++b only ~ Whatis the return value of the expression below given 2/2 that a = 6. x=x+(a=='3')*5-(x=5)/2 O2 on Oo. © Compilation Error v Y According to storage class, Variables can be aval categorized into the following types EXCEPT....... O auto O extern O egister © dynamic v What will be the final value of x in the expression (x+5)+ 1/1 (x =x+10)+ (x = x-10), if x initially is 10? O 15 O 45 @ v O 2 ~ # include int main() { float a,b,c; printf(‘input 2/2 value for a, b, and c"); scanf("%f %f %f",&a,&b,&c); printf("%.2f"(a>b ? (a>c?a:c):(b>c?b:c))); return 0;} What will be the output of the program given that the user input the values: 2.5, 10.6 and 6.4 O 2.50 © 10.60 v O 10.6 O 25 wv Inamixed mode expression, C handles type conversion 1/1 by © elevation vv O elegation O Explicit conversion © computation # include int main() { int x; float y, z: x=5; y=2.5; 2/2 z= x*y; printf("%2d", z); return 0;} What is the output of the code above? © 4.000000 O 125 © 12.500000 Om v Which of the following is not an attribute of a variable in1/1 C programming? © Memory Address © Precision v O Scope O Value Y #include int main(){ char a =x’, b ='y': 2/2 printf("%d", a==b); return 0;} What is the output of the code above? Ox Oy @°0 Vv © Compilation Error Y # include main(){ inta = 8,b=9; printf("%d", 2/2 b=a++); } What is the output of the code above? O23 ©: “ Oo O Compilation Error

You might also like