a=0;
while(a<5)
printf("%d\n",a++);
how many times does the loop occurs?
a.infinite
b.5
c.4
d.6
Answer Posted / vikram
the output will be:
0
1
2
3
4
hence the loop will be executed 5 times,hence the answer is b
| Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What are the different types of objects used in c?
What is the auto keyword good for?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Explain what is #line used for?
What is identifier in c?
What is the most efficient way to store flag values?
What are the features of c language?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is pivot in c?
What is the use of bit field?
how can I convert a string to a number?
Explain what does it mean when a pointer is used in an if statement?
What is array of pointers to string?