answersLogoWhite

0

There is no "elseif" statement in C. You can only use "else" and "if" separately. This is a good reason for switch/case/break.

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JudyJudy
Simplicity is my specialty.
Chat with Judy
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
More answers

if and else statement are used in C Programming to check the condition .when we have one condition we use if statement and if we have two or more condition then we ure if else

User Avatar

Wiki User

12y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Why you use if and else statement in c language program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What translators convert high-level language on statement-by-statement basis?

Machine level instructions can be converted to readable assembly language using a disassembler. If the machine instructions originated from a higher level language, there may also be a decompiler to create something resembling the original high level language version of the program.


What is the method used to implement an if else statement in C?

The else statement is an optional part of an if statement that is executed if the primary if condition is false.if (condition) true_statementelse false_statement


What statement instructs a program to run the garbage collector?

In the case of the Java language, you can use the command:System.gc();Note that this should be interpreted as a suggestion to run the garbage collector; there is no guarantee that it will run immediately.


Why you use if loop in telecoms?

No such thing as if-loop. if-else statement is not a loop.


Structure of If-Then statement?

if (condition) statement1 [else statement2] example: if (i==j); else if (j==k) printf ("i!=j, j==k\n); else printf ("i!=j, j!=k\n); here statement1 is an empty-statement, statement2 is another if-statement There are three forms of statements IF-THEN IF-THEN-ELSE IF-THEN-ELSIF Sequence of statements is executed only if the condition evaluates to TRUE If condition evaluates to FALSE or NULL, it does nothing In either case control passes to next statement after the IF-THEN structure IF THEN statements; END IF; Sequence of statements in the ELSE clause is executed only if the condition evaluates to FALSE or NULL IF THEN statements; ELSE statements; END IF;