Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Interview Questions Loop C Programming For Enginnering Students Basics Viva Tutorials

1.Which is the correct statement?
a) Printf(“Maximum = %d\n”, (x.y) ? x : y);
b) Printf( “%s\n”, (mark >= 60) ? “First class” : “Not first class” );
c) Printf(“%s\n”, PASS);
d) All of the above
ANSWER: D

2.Do-While Loop terminates when conditional expression returns?
a) Zero
b) One
c) Non-zero
d) -1
ANSWER: A

3.In the following loop construct, which one is executed only once always.
for ( exp1; exp2; exp3) {. . . }
a) exp1
b) exp3
c) exp1 and exp3
d) exp1, exp2 and exp3
ANSWER: A

4. if default statement is omitted and there is no match with the case table
a) No statement within switch case will be executed
b) Syntax error is produced
c) Executes all the statements in the switch case construct
d) Executes the last case statement only
ANSWER: A
5.What will be printed when the above code is executed?
main()
{
int a = 2, b = 4, c = 8, x = 4;
if ( x == b) x = a; else x = b;
if( x != b) c = c + b; else c = c + a;
printf(“c = %d\n”,c);
}
a) C = 4
b) C = 8
c) C = 10
d) C = 12
ANSWER: D
CONTINUE READING »


This post first appeared on IngenuityDias, please read the originial post: here

Share the post

Interview Questions Loop C Programming For Enginnering Students Basics Viva Tutorials

×

Subscribe to Ingenuitydias

Get updates delivered right to your inbox!

Thank you for your subscription

×