Question

Identify the values that are considered to be true for conditional statements in C syntax 10 NULL -1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

the answer is option (a) 1.

in C, conditional statement is considered as true when it returns a value 1. and a conditional statement will be executed only if it is true. similarly conditional statement is considered as false when it returns a value 0 ,therefore its statement will not be executed.

for example,

this is a conditional statement in C to check which value is greater among a and b.

a=10;

b=5;

// it will return 1 and it is considered as true and the printf statement is executed.

if ( a>b )

{

printf (" a is the largest value");

}

   // it will return 0 and it is considered as false and the printf statement will not be executed.

if (b>a)

{

printf (" b is the largest value");

}

**********************END*************PLS GIVE ME GOOD RATING*************

Add a comment
Know the answer?
Add Answer to:
Identify the values that are considered to be true for conditional statements in C syntax 10...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT