#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
What are run-time errors?
What is optimization in c?
What is typedef struct in c?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
How do you define structure?
What is c standard library?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
Is that possible to store 32768 in an int data type variable?
Can we change the value of static variable in c?
Write a progarm to find the length of string using switch case?
Explain what are the standard predefined macros?
What does a pointer variable always consist of?
Tell me when is a void pointer used?
Explain can you assign a different address to an array tag?