Bhs Junior Quiz - C++ Conditional Statement -if

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Missyoung
M
Missyoung
Community Contributor
Quizzes Created: 2 | Total Attempts: 3,254
| Attempts: 1,420 | Questions: 4
Please wait...
Question 1 / 4
0 %
0/100
Score 0/100
1. The programming language of C++ was written by Bjarne Stroustrup.

Explanation

Bjarne Stroustrup is the creator of the C++ programming language. He developed C++ as an extension of the C programming language, adding object-oriented programming features. Therefore, the statement that the programming language of C++ was written by Bjarne Stroustrup is true.

Submit
Please wait...
About This Quiz
Conditional Statements Quizzes & Trivia

Welcome Juniors to using Proprofs on-line assessment. This is the first of many on-line assessments that will be done this semester. This is a... see moretimed quiz so work efficiently. see less

2. Select the correct code for the following statement: If the name of a person is definitely Joe, say hello.

Explanation

The correct code for the given statement is "if(nam=="Joe") {cout". This code checks if the value of the variable "nam" is equal to the string "Joe". If it is, then it will execute the code inside the curly braces, which in this case is printing "hello".

Submit
3. To determine whether or not a person is an adult based on their current age, the most appropriate conditional statement to use is the _______________________ statement.

Explanation

The most appropriate conditional statement to use when determining whether or not a person is an adult based on their current age is the "if" statement. This statement allows for a single condition to be checked and a corresponding action to be taken if the condition is true. However, if additional conditions need to be checked and different actions need to be taken based on those conditions, the "if-else" statement or the "if-else if-else" statement can be used. A loop statement, on the other hand, is used for repeating a block of code multiple times.

Submit
4. In a conditional statement to determine if the sum of x and y is equal to z, then a = x+y, what is the actual condition in C++?

Explanation

The actual condition in C++ is "x+y=z". This condition checks if the sum of x and y is equal to z. If it is true, then the code block inside the if statement will be executed, which assigns the value of x+y to the variable a.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 09, 2018
    Quiz Created by
    Missyoung
Cancel
  • All
    All (4)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
The programming language of C++ was written by Bjarne Stroustrup.
Select the correct code for the following statement: ...
To determine whether or not a person is an adult based on their...
In a conditional statement to determine if the sum of x and y is equal...
Alert!

Advertisement