what is the output of the following program?
#include<stdio.h>
void main()
{
float x=1.1;
while(x==1.1)
{
printf("\n%f",x);
x=x-0.1;
}
}
Answer Posted / vignesh1988i
for the first time the loop will be true and it will print as 1.100000 , after reading the next line x will be 1.0, so again when it comes into while loop 1.000000 not equal to 1.100000 so it will come outside the loop
| Is This Answer Correct ? | 4 Yes | 20 No |
Post New Answer View All Answers
What is the maximum length of an identifier?
What is the scope of an external variable in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Explain continue keyword in c
Explain how do you view the path?
What is a lookup table in c?
What is unsigned int in c?
What is the meaning of 2d in c?
What are type modifiers in c?
Linked lists -- can you tell me how to check whether a linked list is circular?
code for quick sort?
Explain what is the difference between null and nul?
What is the use of pointers in C?
Is fortran still used today?
Is sizeof a keyword in c?