Swim with C online Test

Which is the correct output of the following program

void main()

{

unsigned int i = 65536;

while(i++)

printf("%d",++i);

}


what is the correct output of the program

void main()

{

unsigned int i=65535;

while(i++)

printf("%d",++i);

}


what is the correct output

void main()

{

float a =0.8;

if(a > 0.8)

printf(" hello");

else

printf("World");

}


what is the correct output

void main()

{

int x,y,z;

x=y=z=1;

z=++x||++y&&++z;

printf(" x = %d y = %d z = %d",x,y,z);

}


void main()

{

int a, num=20;

k = (num>5) ? ( num<=10) ? 100 : 200 ):500);

printf("%d",num);

}


void main()

{

int i =10,j=20;

if(i=5) && if(i=10)

printf(" \n Hello");

}


void main()

{

int a =0,b=1,c=3;

*((a) ? &b:&a)=a?b:c;

printf(" %d %d %d",a,b,c);

}


void main()

{

int i = 0;

i++;

if( i<=5)

{

printf("Hi");

exit();

main();

}


void main()

{

int x =1,y=1;

for(;y;printf(%d %d\n",x,y);

}











































































Description:

I will be creating tests on basics of c which will ensure you to strengthen your C skills. As you all know , every company takes aptitude test , which involves some questions on c to just test the logical and analytical thinking of the candidate. Please do not use turboc to compile and see the output and then answer. You will be cheating yourself, not me. Best of Luck

Comments

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
10 Followers

Your Facebook Friends on WizIQ

More Tests By Author

Vedic Maths
12 Questions | 217 Attempts

C control instructions
9 Questions | 78 Attempts

Test C Skills part 2 by rahul. 8421344447
7 Questions | 132 Attempts

Testing C Skills
8 Questions | 416 Attempts

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect