for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????
Answer Posted / vignesh1988i
since after the loop there is a semicolon , so according to
the compiler this semicolon will be taken as next line and
the loop will be iterating till the termination condition....
output possibilities :
1)if the variable 'i' which is used as an signed integer
variable , this will take an infinite values and stop at one
instance and it will terminate the application. but wont
display anything in the screen
2) if this is an unsigned variable this will be infinite
with values going on and on without stopping.. but not
displaying it...
conclusion : loop is infinite here.....
thank u
Is This Answer Correct ? | 12 Yes | 8 No |
Post New Answer View All Answers
What do mean by network ?
Why do we use pointer to pointer in c?
what is the different bitween abap and abap-hr?
What is an endless loop?
Differentiate between null and void pointers.
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What are reserved words?
what will be the output for the following main() { printf("hi" "hello"); }
What is typeof in c?
I need previous papers of CSC.......plz help out by posting them.......
How many loops are there in c?
What is sizeof int in c?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Can we declare a function inside a function in c?
what type of questions arrive in interview over c programming?