Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is difference between structure and union in c?

987


Write a program to print fibonacci series without using recursion?

1131


Explain is it better to bitshift a value than to multiply by 2?

1196


application attempts to perform an operation?

1969


Are pointers integers in c?

1073


What is cohesion in c?

980


What are global variables?

1178


why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above

1072


Which node is more powerful and can handle local information processing or graphics processing?

1315


What are pointers? What are different types of pointers?

1133


Describe how arrays can be passed to a user defined function

1289


What is the purpose of main() function?

1243


The statement, int(*x[]) () what does in indicate?

1145


What do you mean by dynamic memory allocation in c? What functions are used?

1160


How does sizeof know array size?

1113