Documente Academic
Documente Profesional
Documente Cultură
QUESTIONS
1.
Career: Stroustrup began developing C++ in 1978 (then called "C with Classes"), and, in his
own words, "invented C++, wrote its early definitions, and produced its first
implementation... chose and formulated the design criteria for C++, designed all its major
facilities, and was responsible for the processing of extension proposals in the C++ standards
committee." Stroustrup also wrote a textbook for the language, The C++ Programming
Language.
Stroustrup was the head of AT&T Bell Labs' Large-scale Programming Research department,
from its creation until late 2002. Stroustrup was elected member of the National Academy
of Engineering in 2004. He is a Fellow of the ACM (1994) and an IEEE Fellow. He works at
Texas A&M University as a Distinguished Professor where he holds the College of
Engineering Endowed Chair in Computer Science. He is also a visiting faculty in Computer
Science Department at Columbia University. ITMO University noble doctor since 2013. In
2015, he was made a Fellow of the Computer History Museum for his invention of the C++
programming language.
2.
Example go to
b) While
In computer programming, loop cause a certain piece of program to be executed a
certain number of times. Consider these scenarios:
You want to execute some code/s certain number of time.
You want to execute some code/s certain number of times depending upon input
from user.
There are 3 types of loops in C++ Programming:
for Loop
while Loop
do...while Loop
Syntax of while
Example While
Syntax of break
Example
Syntax of continue
Example
d) While True
A while loop statement repeatedly executes a target statement as long as a given
condition is true.
Syntax:
e)
Do / While
Unlike for and while loops, which test the loop condition at the top of the loop,
the do...while loop checks its condition at the bottom of the loop.
A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to
execute at least one time.
Syntax:
Example
f) Jump / Loop
A C++ jump statement performs an immediate local transfer of control.
Syntax
g) If / else
An if statement can be followed by an optional else statement, which executes when
the boolean expression is false.
Syntax:
Example