[ create a new paste ] login | about

Link: http://codepad.org/uuVjoD40    [ raw code | output | fork | 1 comment ]

C, pasted on Feb 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<stdio.h>
int main()
{
	float a=0.7;
	if(a<0.7)
	{
		printf("c\n");
	}
	else
	{
		printf("c++\n");
	}
	return 0;
}


Output:
1
c


Create a new paste based on this one


Comments:
posted by goyaltwinkle80@gmail.com on Jun 30
actuallu 0.7 is a doble type constant here by default ,it occupies 8 bytes of memory space wrt float that occupies 4 bytes therefore floating a is less than double constant thereby giving OUTPUT "C".
reply