Укажите верный синтаксис для оператора if C++?
Операторы If и Switch в C++

Quiz
•
Computers
•
10th Grade
•
Medium
Надежда Натарова
Used 19+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
if (логическое выражение) {оператор1 }; else {оператор2};
if test
IF test
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пусте места, чтобы сравнить переменные и вывести на экран «hi there»:
int x = 5;
int y =3;
if ( ......... )
{
cout <<«hi there»;
}
х=y
x>y
x<y
x!=y
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Какой оператор используется для сравнения?
=
<<
==
!=
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пустые места, чтобы сравнивать переменные и вывести «not equal» на экран.
int x = 10;
int y = 8;
if ( ................) {
cout << «not equal»;
}
==
!=
=
<>
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Каков результат работы следующего франмента кода?
int x = 0;
switch(x)
{
case 1: cout << "Один";
case 0: cout << "Нуль";
case 2: cout << "Привет мир";
}
а) НульПривет мир
б) Привет мир
в) Один
г) Нуль
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пустые места, чтобы проверить значение переменной x; если x равен 2, вывести на экран ‘its 2"; иначе (случай default), вывести на экран "the default case";
int x;
cin>>x;
switch (x) {
case 2: cout<<"its 2″<<endl; break;
............... : cout<<«the default case»<<endl;
}
default
else
ifelse
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что произойдёт, если мы забудем добавить «break» после «case»?
Будут выполнены остальные операторы case
Ничего
Ошибка времени выполнения
Create a free account and access millions of resources
Similar Resources on Quizizz
9 questions
Test-C++Tablouri unidiensionale-prof. Tudor V

Quiz
•
10th Grade - University
10 questions
Informatik - Kontrollstrukturen

Quiz
•
10th - 11th Grade
11 questions
Caligrafía | CM7

Quiz
•
1st - 10th Grade
10 questions
Array

Quiz
•
10th Grade
10 questions
10 ԹԳՀԳ 2-րդ կիսամյակ ամփոփիչ գրավոր աշխատանք/ֆունկցիաներ/

Quiz
•
10th Grade
15 questions
Quiz Pemograman UTS

Quiz
•
10th Grade
13 questions
C++ Loops

Quiz
•
9th - 12th Grade
10 questions
Pemrograman Dasar C++

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University