CC102- MIDTERM PROGRAMMING Flashcards

1
Q

In C++ programming language, we sometimes require to compare values and expressions. This comparison allows us to determine relationships, make decisions, and control the flow of our programs.

The ———- in C++ provide the means to compare values and evaluate conditions.

A

relational operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

are used to perform arithmetic or mathematical operations on the operands.

A

arithmetic operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When the condition
becomes false, program
control passes to the line
immediately following the
loop.

A

while loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If it is true, the loop
executes and the process
repeats itself (body of
loop, then increment step,
and then again condition).
After the condition
becomes false, the for
loop terminates

A

for loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • If the condition is true, the
    flow of control jumps back
    up to do, and the
    statement(s) in the loop
    execute again. This process
    repeats until the given
    condition becomes false
A

do while

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When the break
statement is encountered
inside a loop, the loop is
immediately terminated,
and program control
resumes at the next
statement following the
loop.

A

break statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • The continue statement
    works somewhat like the
    break statement. Instead of
    forcing termination,
    however, continue forces
    the next iteration of the
    loop to take place, skipping
    any code in between.
A

continue statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A loop becomes infinite
loop if a condition never
met or false.

A

infinite loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.

A

array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly