C MCQ : if statement > Logical OR Operator inside if
#include<stdio.h> void main() { if(1 || 0) printf("Dennis Ritchie is Father of C Programming"); else printf("Why to learn C ?"); }
Guess What will be the Output ?
Options :
- Why to learn C ?
- Compile Error
- Dennis Ritchie is Father of C Programming
- Run time Error
Why & How ?
- OR Operator is used .
- If any of the case is True then If block will be executed.
- If it founds First Operand as non-zero number then it declare whole statement as TRUE statement
0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email