Home > C Programming > Loops > Questions and Answers
01. | What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run? | |||||||||||
|
02. | When does the code block following while(x<100) execute? | |||||||||||
|
03. | Which is not a loop structure? | |||||||||||
|
04. | How many times is a do while loop guaranteed to loop? | |||||||||||
|
05. | The statement which prints out the values 1 to 10 on separate lines, is | |||||||||||
|
06. |
The statement which produces the following output is, (hint: use two nested for loops) 1
22 333 4444 55555 | |||||||||||
|
07. | The statement which sums all values between 10 and 100 into a variable called total is, assuming that total has NOT been initialised to zero. | |||||||||||
|
08. | The statement that prints out the character set from A-Z, is | |||||||||||
|
09. |
The statement which prints the integer values 1 to 10 on the screen, is 12345678910 | |||||||||||
|
10. |
How many times the below loop will run main() { int i; i=0; do { --i; printf("%d",i); i++; } while(i>=0); } | |||||||||||
|