While Loop, Do While Loop
While Loop, Do While Loop
C++ ﻟﻐـــــــــــﺔ
Dr. khaled Alwesabi
1 C++ Programing
Quiz 2021 Quiz C++ Programing
C++ Programing
Assignment 7
3 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
4 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
5 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
6 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
7 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
8 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
9 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
10 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
11 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
12 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
13 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
14 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
15 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
3- The For Loop.
For Loop is probably the most popular looping instruction.
16 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
17 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
18 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
19 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
20 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
21 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
22 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
23 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
24 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
25 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
26 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
27 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
28 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
29 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
30 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
These statements doesn't check any condition to execute the code. These
statements are pretty much useful to transfer the control from one block
31 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
Break statement
The break statement is used to com out of the loop in a program.
32 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
Break statement
The break statement is used to com out of the loop in a program.
33 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
Break statement
The break statement is used to com out of the loop in a program.
34 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
continue statement
The continue statement is used to go back to the beginning of the loop
In a program.
35 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
continue statement
36 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
continue statement
37 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
goto statement
The goto statement is used to transfer the control of the program from
Any location to any location.
38 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
goto statement
.
39 ﻋﻣﻠﻲ
Lecture 5
while loop , do while loop
Unconitional Branching statement
goto statement
.
40 ﻋﻣﻠﻲ
Quiz 2021 Quiz C++ Programing
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. do { } while (test);
b. Do while test;
c. Doo while(test)
C++ Programing
Assignment 7
int x = 0;
do{
cout << x<< endl;
x++;
}
while ( x < 10 );
C++ Programing
Assignment 7
c. Do… while loop tests the condition before running the code
C++ Programing
Assignment 7
int x = 1;
do{
cout << “ this is a loop “<< endl;
x++;
}
while ( x <= 15 );
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. switch (test) { }
b. SWITCH test { }
c. Switch test ;
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. Nothing
b. A compile-time error
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. Either a or b is true
C++ Programing
Assignment 7
a. Only one
b. Two
C++ Programing
Assignment 7
C++ Programing
Assignment 7
The result of a || b is true if ( select two answers ) : (select all that apply)
b. Either a or b is true
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
statements
C++ Programing
Assignment 7
Select the correct statements about && and || operators. (select all that apply)
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
Which of the following are legal variable names in C++ ? (select all that apply)
a. 13legal_name
b. Think_is_LEGAL
c. *!@is -legal
d. notLegal
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. my_function
b. main
c. #include
d. Int()
C++ Programing
Assignment 7
C++ Programing
Assignment 7
d. Int()
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. After it is call
c. With call
d. Through of call
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. My_function
b. #include
c. int()
d. main
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. 5! Equals 5*4*3*2*1
b. 5! Equals 0
c. 5! Equals 5
d. 5! Equals 5*4*3*1
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. A base case
b. An empty body
c. A return value
d. Cassese real
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
What are the two different ways to pass arguments into functions:
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. Is a recursive function
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
What is a pointer?
a. A function
c. A header file
d. Variable in function
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. “hello” +11
b. 12 + 4
c. 12 + “Mike”
d. “hello” * 3.14
C++ Programing
Assignment 7
Which of the following are correct values for the numeric data types? (Select all
that apply)
a. “hello”
b. 3.14
c. ‘abc’
d. 1000
C++ Programing
Assignment 7
a. “this”
b. “or this”
c. ‘t’
d. ‘this’
C++ Programing
Assignment 7
C++ Programing
Assignment 7
Is 3.14 an integer?
a. Yes
b. No
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. Yes
b. No
C++ Programing
Assignment 7
C++ Programing
Assignment 7
C++ Programing
Assignment 7
a. X += 10 ;
b. X = y + 10 ;
c. X -= 9 ;
d. X *= 10 ;
C++ Programing
Assignment 7
a. X =x+1;
b. X /= 17;
c. X = x-4;
d. X *= 10 ;