#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
a=0.5;
if(a==0.5)
printf("yes");
else
printf("no");
getch();
}

Answer Posted / ravi kant singh

Answer is it will print no.....because you can not compare two floating point number upto precision 

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by keywords in c?

614


Write a simple code fragment that will check if a number is positive or negative.

700


Write a program in c to replace any vowel in a string with z?

680


What is file in c preprocessor?

643


What is a pointer on a pointer in c programming language?

611






in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

592


What is a good data structure to use for storing lines of text?

584


What is an expression?

648


Why is %d used in c?

559


What is the advantage of an array over individual variables?

728


Here is a neat trick for checking whether two strings are equal

558


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

651


how can f be used for both float and double arguments in printf? Are not they different types?

602


What do header files do?

595


What are high level languages like C and FORTRAN also known as?

670