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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!