Pages

Sunday, October 9, 2011

Solution For C Programs.....

Solution For C Programs......
Hi!!Friends Now  I Just Add a Simple C program given below:
#include<stdio.h>
main()
{
float a=0.7;
if(a==0.7)
printf("Success");
else
printf("Failure");
getch();
}
Output:
Failure
Reason:
Because,Every C programs Consider as a double datatype...so here 0.7 consider as a double...and float a=0.7 consider as a float datatype...when we will check those numbers it prints Failure..because,compiler consider as only memory of data types...so...float has 4bytes and double has 8bytes...so it will prints failure...
Hello!!!Friends...If you want to learn simple C program..
Here my E-mail Address:
kevincastrofeb@gmail.com 


No comments:

Post a Comment