Question

Explain the use of the following available in c++ programming with an example.

  1. If
  2. For
  3. Switch

 

18 Oct 2017
Answer :
Word Count : 259
  1. If statement:-

If statement is used to check the condition between two operands. If condition is true statement is executed otherwise not executed.

Syntax of if statement

If (expression)

{

Statements;

}

EXAMPLE:-

#include<iostream.h>

#include<conio.h>

void main()

{

int a,b;

_____ ________ _____ ___ ______ __________ __________ ______.
________ ___ ____ __________ ___.
___ _______ ____ ___ _____ _____ _________ ________ ______ ________ ________.
_____ ________ _________ ____ ________ _______ _____ _________.
__________ ______ _____ ________ __________ ______ ______ ____ _______ ______ __________.
_________ ________ _________ ________ ____.
______ __________ __________ __________ _____ ____ ______ _____.
_________ _________ ______ _________ ______ __________ ________ ________ _____ ____ _______ ___.
______ __________ __________ __________ ___ _____ _____ __________ ______ __________ ____.
_____ _____ ____ ____ ___ ____ _______ ____ ________ ____ ____ ______.
_________ _____ ________ _____ ________ _________ ______ ____ ______.
_______ _____ _______ __________ _______ __________ _________ _________ _________ _________.
________ _______ ___ ________ ______ ________.
__________ ________ ____ __________ _________ ______.
__________ ______ _______ ________ __________ __________ _________ __________ ____ ___ _______.
_______ ____ ___ _______ ________ _________ _______ ___ ________ ______ _________ _________.
_______ __________ ___ ____ ____.
____ ___ _____ ______ _______ _____ _________ __________ __________ _________ ____.
___ _________ _______ __________ ______ ____ ______ _________ ______ _______.
__________ ______ ____ _____ _____ __________ _________.
______ ___ _____ ________ ______ ______ ________ _______ ______ _____ ________.
_______ _________ _____ _______ _______ ____ _____ _______.
____ _____ ____ ____ _________.

IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10

Top