Question
Hi so its just quic standard c programming questions... 1. float x; x =0.35==3.5/10; printf(%f,x); The answer listed is 1.000000 and I was wondering why
Hi so its just quic standard c programming questions...
1. float x;
x =0.35==3.5/10;
printf("%f",x);
The answer listed is 1.000000 and I was wondering why that is?
2. int num = 2;
int a=5;
num = -a++-num;
printf( "%d,%d", num,a);
The answer listed is -7,6 why is num now -7 and why is a now 6? Also for the "%d,%d" part shouldnt it be "%d","%d" or no?
Lastly
Q.3
int x= 130;
if(x>=0 && x<=100)
printf("Valid grade");
else
{
if(x<0)
printf("Under range!!");
else
printf("Over range!!");
}
The anser for this is Over range!! but can somebody explain why that is or the process?
Thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started