1.

To check more than two conditions, ___ is used with if-else statements.(a) while(b) for(c) elif(d) forI have been asked this question in an interview for internship.I want to ask this question from Logical Operators and Conditional Execution in chapter Essential Shell Programming of Unix

Answer»

Correct choice is (c) elif

Easiest EXPLANATION: if-else STATEMENTS MAKES TWO-way decisions depending on the fulfillment of certain CONDITIONS. But if we want to check more than two conditions we can use elif statement. For example,



Discussion

No Comment Found

Related InterviewSolutions