C control instructions online Test

Q1. Point out the error if any in the for loop

void main()

{

int i=1;

for(;;)

{

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

if(i>10)

break;

}

}


void mai()

{

while(-10)

printf('Hello\t");

}


void main()

{

int i;

for(i=0;i;i++)

printf(" %d ",i);

}


void main()

{

int i;

for(i=1;i<=10;i++);

printf("%d",i);

}


void main()

{

int num,r=1;

for(printf('Enter a number "),scanf("%d",&num);num;r=r*num,num--);

printf(" r = %d ", r);

}

suppose the user entered 5.


void main()

{

int arr[] = { 1,2,3,4,5};

arr++;

printf(" address of arr = %u",arr);

}

Suppose the starting address of the array is 1000


void main()

{

int a,b;

a=3;

b=5;

a= b++ + b++ + ++b + ++b + b++ + --b + ++b;

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

}


void main()

{

int a,b,c;

a=10;

b=20;

c=30

a^=b^=c^=b;

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

}


void main()

{

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

printf( %d %d %d");

}













































































Description:

If you have mastered the art of understanding how the various loops works than half of ur problem is finished because all other major programming languages almost uses the same format ( with some slight addition). So learning a new language once you have understood c is not very difficult. I also teach Vedic Mathematics , so anybody who is intersted can mail me or call me on this number 8421344446

Comments
lalbahadur
By: lalbahadur
372 days 22 hours 48 minutes ago

this programe is wrong galat hai !!!

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

Swim with C
9 Questions | 52 Attempts

Vedic Maths
12 Questions | 217 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