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 / bharath kumar
Hello,
The answer is b.
a=0+1=1
a=1+1=2
a=2+1=3
a=3+1=4
a=4+1=5
While a variable is storing the 5 result a is nither less
then are equal to 5 hence the application will come out of
the loop.So while loop had run 5 times.
| Is This Answer Correct ? | 28 Yes | 4 No |
Post New Answer View All Answers
Why pointers are used in c?
What does 3 mean in texting?
Describe the difference between = and == symbols in c programming?
Why is c still so popular?
How to set file pointer to beginning c?
Is main is user defined function?
Why void is used in c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What does the && operator do in a program code?
What is const volatile variable in c?
Why does everyone say not to use gets?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
Differentiate between functions getch() and getche().