
Kiến thức C++ cơ bản - Test1
Authored by - Hoa
Computers
12th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kiểu dữ liệu nào trong C++ được dùng để lưu trữ một số nguyên?
int
float
double
char
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Biến nào trong các biến sau được khai báo đúng trong C++?
int 1abc;
double num1 = 5.0;
char name = "John";
float 123number;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kiểu dữ liệu double khác với float như thế nào trong C++?
Dung lượng bộ nhớ
Loại dữ liệu lưu trữ
Phạm vi giá trị có thể biểu diễn
Cả A và C đều đúng
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cấu trúc rẽ nhánh if-else trong C++ được dùng để làm gì?
Lặp lại các khối lệnh
Thực thi các lệnh khi điều kiện đúng
Chuyển giá trị giữa các biến
So sánh hai giá trị
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Đoạn mã C++ nào dưới đây đúng để kiểm tra xem một số có chia hết cho 2 hay không?
if (n % 2 == 0) { cout << "Số chia hết cho 2"; }
if (n / 2 == 0) { cout << "Số chia hết cho 2"; }
if (n * 2 == 0) { cout << "Số chia hết cho 2"; } else { cout << "Số không chia hết cho 2"; }
if (n % 2 == 0) { cout << "Số chia hết cho 2"; } else { cout << "Số không chia hết cho 2"; }
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Giá trị của x sau khi chạy đoạn mã sau là bao nhiêu? int x = 10; if (x > 5) { x += 5; } else { x -= 5; }
5
10
15
0
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Điều nào sau đây mô tả đúng sự khác biệt giữa switch và if-else trong C++?
switch chỉ dùng cho các phép so sánh số nguyên, if-else có thể kiểm tra nhiều điều kiện phức tạp hơn
switch linh hoạt hơn và có thể kiểm tra nhiều điều kiện hơn so với if-else
if-else dùng tốt hơn cho các giá trị cụ thể, switch cho các giá trị logic
Cả switch và if-else đều không cho phép kiểm tra điều kiện với giá trị số nguyên
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
Examen 1er parcial A
Quiz
•
12th Grade
10 questions
SHORTCUT PADA KEYBOARD
Quiz
•
10th - 12th Grade
10 questions
3ero Informática PBD
Quiz
•
12th Grade
10 questions
Modulo 3. Interconexión de dispositivos
Quiz
•
University
10 questions
Preguntas sobre Hojas de Cálculo
Quiz
•
12th Grade - University
10 questions
WORD ĐỀ 6
Quiz
•
University
10 questions
OS Essentials Chp11: Windows Configuration Quiz on 11.5 to 11.7
Quiz
•
11th - 12th Grade
10 questions
Gestión de Procesos
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade