C Programming - Expressions - Discussion
Discussion Forum : Expressions - Point Out Correct Statements (Q.No. 1)
1.
Which of the following statements are correct about the below program?
#include<stdio.h>
int main()
{
float a=1.5, b=1.55;
if(a=b)
printf("a and b are equal\n");
else
printf("a and b are not equal\n");
return 0;
}
Discussion:
15 comments Page 2 of 2.
Girish nischel said:
1 decade ago
So whenever I write if (a=b) is the condition true?
Gandi said:
2 decades ago
In if condition how we use single equal symbol
Debashree said:
1 decade ago
Yah it's true.. @Girish Nischel
S.Arjun said:
1 decade ago
Yes its possible Thilagavathi.
Mani said:
1 decade ago
Ya possible. Thilagavathi.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers