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;

a=4;

b=3;

  1. (a<b)

cout<<”a is less than b”;

}

  1. For:- repeat the statement upto
________ _______ _______ _________ ____ ___.
_______ __________ ________ _____ ______ __________.
________ ___ ____ _______ ___ ________ ______ _________ ___.
_____ __________ _____ _______ ___ _______ ________ _______ ___.
__________ ________ ________ __________ _____ _____ _________ __________ _____ __________ _____.
___ ______ ______ _____ _____ ______.
___ ____ __________ ___ ________ ______.
__________ ___ ______ _________ _______ ____ ___.
_____ __________ _______ _________ _____ __________ ___.
____ _____ _______ __________ ________ ______ ______ ____.
________ _______ ____ _______ ________ _______ __________ _______ __________ _________ ____.
_______ __________ ________ ______ _______ ____ ________.
________ ___ __________ ____ _____ __________ _____.
________ _______ _________ __________ ______ ________.
__________ ___ _____ _________ __________ _______ ______ _______ ___ _______ __________.
__________ __________ _____ _________ _____ _______ ____ _________ _______.
___ _____ ____ _____ _________ __________ _________ _______ ______ ___ _____ __________.
_______ _____ ___ _______ _________ ___ _______ ____ ___.
_________ ____ ________ __________ ________.
____ _____ ______ ____ _____ _______ _____ _______.
__________ _____ __________ ______ _________ _______ _______.
_____ __________ _____ _______ _____ _______ ______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCS 31 2016 - Explain the use of the following available in c++ programming with an | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→