C Programming - Control Instructions - Discussion

Discussion Forum : Control Instructions - Point Out Correct Statements (Q.No. 4)
4.
Which of the following statements are correct about an if-else statements in a C-program?
1: Every if-else statement can be replaced by an equivalent statements using   ?: operators
2: Nested if-else statements are allowed.
3: Multiple statements in an if block are allowed.
4: Multiple statements in an else block are allowed.
1 and 2
2 and 3
1, 2 and 4
2, 3, 4
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
25 comments Page 3 of 3.

Sridhar said:   1 decade ago
Simple in under one if statement we can declare many if and else satements.

Sindhu said:   1 decade ago
We can replace an if-else structure with a ternary operator. Isn't it so?

Nehal said:   9 years ago
One more thing that we cannot use return in conditional statement.

Panchangam Chidrupi said:   7 years ago
What is the difference between = and == operators? Please tell me.

Gayatri Walmik said:   9 years ago
Can anyone please explain why the first option is incorrect?


Post your comments here:

Your comments will be displayed after verification.