Операторы If и Switch в C++
Quiz
•
Computers
•
10th Grade
•
Medium
Надежда Натарова
Used 20+ times
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Укажите верный синтаксис для оператора if C++?
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
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Ms. Exel dan Fungsi Logika IF
Quiz
•
10th Grade - University
16 questions
شبكات الحاسوب + البروتوكولات
Quiz
•
10th Grade
10 questions
Jaringan Komputer-Selasa
Quiz
•
10th Grade
14 questions
4th quarter 2nd summative
Quiz
•
10th Grade
12 questions
Сетевые компоненты
Quiz
•
7th - 10th Grade
18 questions
LỚP 12 - CHỦ ĐỀ B - BÀI 1 + 2 MẠNG MT VÀ GIAO THỨC
Quiz
•
10th Grade - University
15 questions
Coding Quiz
Quiz
•
6th - 10th Grade
16 questions
Computer Hardware--Outside
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
10 questions
Halloween Trivia Challenge
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
