C Language - Control Statements

You Are Here :: Home > C Language > Control Statements - General Questions

 
31.

#include

void main()
{
if(1 || 0)
printf("Dennis Ritchie ");
else
printf("C ");
}

A. C B. Compile Error
C. Dennis Ritchie D. Run time Error




32.

#include

void main()
{
int a=1,b=2;
if(printf("%d",printf("123")),0)
{
printf("Connected");
}
else
{
printf("Disconnected");
}
}

A. 123Connected B. 1233Connected
C. 123Disconnected D. 1233Disconnected




33.

#include

void main()
{
int num1=10,num2=20,num3;
num3 = num1 > 2 + num2!=3;
printf("%d",num3);
}

A. 20 B. 1
C. 10 D. 0




34.

void main()

{
int a=10,b=20;
char x=1,y=0;
if(a,b,x,y)
{
printf("EXAM");
}
}
What is the output?

A. XAM is printed B. EXAM is printed
C. Compiler Error D. Nothing is printed




35.

void main()

{
int marks=50;
if(marks>=40)
{
printf("Student is Pass");
}
else
{
printf("Student is Fail");
}
}

A. Student is Fail B. Student is Pass
C. 0 D. Compile time error




36.

int largest, a=10, b=20, c=30 ;

largest = (a > b ? ( a > c ? 10: 30 ) : ( b > c ? 20: 30 ) );
printf("Largst Number : %d",largest);

A. Largst Number : 10 B. Largst Number : 20
C. Largst Number : 30 D. Compile time error




« previous

1

2

3

4

5

6

7

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on