Right Click to Search

Sunday, April 18, 2025

If Condition MCQ 3 : Logical OR Operator inside if Condition





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 : 
  1. Why to learn C ?
  2. Compile Error
  3. Dennis Ritchie is Father of C Programming
  4. Run time Error



Why & How ?
  1. OR Operator is used .
  2. If any of the case is True then If block will be executed.
  3. If it founds First Operand as non-zero number then it declare whole statement as TRUE statement

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

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

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates