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

I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1022


What is the scope of global variable in c?

1000


How can I determine whether a machines byte order is big-endian or little-endian?

1067


write a program to rearrange the array such way that all even elements should come first and next come odd

2287


How do you define a function?

1035


Explain the difference between malloc() and calloc() function?

1060


What the different types of arrays in c?

1074


What is pointers in c?

1124


write an algorithm to display a square matrix.

2717


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1066


Explain what is a 'locale'?

1090


How many bytes are occupied by near, far and huge pointers (dos)?

1166


Can a pointer be volatile in c?

1000


Is c high or low level?

1016


Are the outer parentheses in return statements really optional?

1125