Professional Documents
Culture Documents
QUESTIONS
1. WHAT IS C++?
C++ is a general purpose programming language.It has imperative, objectoriented and generic programming features, while also providing the facilities
for low level memory manipulation.
e) Function
Allow to structure programs in segments of code to perform individual tasks.
f) Cout
Cout represent the standard output stream in C++, and the meaning of the
entire statement is to insert a sequence of characters (in this case the sequence
of characters) into the standard output stream.
g) <<
The bitwise left shift to shifts operator bits to the left.
h) Hello word\n
To make sure that a language's compiler, development environment, and runtime environment are correctly installed. Configuring a complete programming
toolchain from scratch to the point where even trivial programs can be
compiled and run can involve substantial amounts of work. For this reason, a
simple program is used first when testing a new tool chain.
i) \n
Moves the active position to the initial position of the next line.
j) ;
The separation between statements is specified with an ending semicolon at the
end of each one sentences.
k) Return 0;
The main functions returns an integer. If everything went Ok, the program
exited gracefully.
MATHEMATICALS OPERATORS
SYMBOL
1 +
2 3 *
4 /
5 %
MEANING
Addition
Subtraction
Multiplication
Divison
Modulo
RELATIONAL OPERATORS
SYMBOL
1 ==
2 !=
3 <
4 >
5 <=
6 >=
MEANING
Equal To
Not Equal To
Less Than
Greater Than
Less Than Or Equal To
Greater Than Or Equal to
d) While True
A while true statement that reapeatedly executes a target
statement as long as a given condition is true.
e) Do/While
Do statement conditionaly executes a statement one or more
times.
For statement evaluates a sequence of initialization expressions
and then, while a condition is true, repeatedly executes a
statement and evaluates a sequence of iteration expressions
f) Jump/Loop
Loop repeat a statement a certain number of times, or white a
condition is fulfilled . They are introduced by the keywords
while, do , and for.
Jump statements allow altering the flow of a program by
performing jumps to specific location.
g) If/Else
If statement selects a statement for execution base on the value
of a Boolean expression. An if statement may optionally include
an else clause that executes if the Boolean expression is false
The else clause of an if...else statement is associated with the
closest previous if statement in the same scope that does not
have a corresponding else statement.