#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 / sandeep

HI froends this is sandeep,
Coming to the question :
First of all we should know that in c language:
integers by default are treated as int,
and numbers with decimal point as double.
so int the ques tion "a is float",but "0.5 is double by default" and "double > float by default"
so "a==0.5" turns out to be false,
so else statement will be executed


output:no

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are run-time errors?

594


What is optimization in c?

562


What is typedef struct in c?

577


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

748


How do you define structure?

558






What is c standard library?

687


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1535


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2402


Is that possible to store 32768 in an int data type variable?

685


Can we change the value of static variable in c?

556


Write a progarm to find the length of string using switch case?

1602


Explain what are the standard predefined macros?

647


What does a pointer variable always consist of?

655


Tell me when is a void pointer used?

642


Explain can you assign a different address to an array tag?

636