Give examples of each of the following:
Insertion Operator
Extractor Operator
Input filestream object
Output filestream object
Class
Preprocessor command
Directive
Function
Function call
Argument
Assignment statement
Assignment operator
Data type
Declaration statement
Instantiation statement
Three types of repetition structure (statement)
Two types of selection structure
Condition for a selection structure or repetition statement
Insertion Operator : cout<<"Hello World";
Extractor Operator : cin>>num1;
Input filestream object : ifstream ifs;
Output filestream object : ofstream ofs;
Class : class Student{}
Preprocessor command : #include
Directive : #include<stdio.h>
Function : void fun(int a){}
Function call : fun();
Argument : fun(10);
Assignment statement int x=10;
Assignment operator =
Data type : int
Declaration statement : int x;
Instantiation statement : int x =10
Three types of repetition structure (statement):
while
do while
for
Two types of selection structure
if else
switch
Condition for a selection structure or repetition
statement
if(num<10)
for(int i=0;i<10;i++)
Get Answers For Free
Most questions answered within 1 hours.