Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Nested Relations And Complex Objects In Databases Lncs 361

Authors: Serge Abiteboul ,Patrick C. Fischer ,Hans-Jorg Schek

1st Edition

3540511717, 978-3540511717

More Books

Students also viewed these Databases questions