Hàm 1
Quiz
•
Computers
•
6th Grade
•
Practice Problem
•
Medium
Edu TSmart
Used 10+ times
FREE Resource
Enhance your content in a minute
31 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khai báo nào sau đây là đúng để tạo một map lưu tên (string) và điểm số (int)?
map<string, int> m;
map<int, string> m;
unordered_map<string, int> m;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Giá trị mặc định khi truy cập map["abc"] mà chưa có key "abc" là gì?
Gây lỗi
Chèn "abc" với giá trị mặc định (0 nếu kiểu int)
Bỏ qua không làm gì
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để đếm tần suất xuất hiện của từng số nguyên trong một mảng, ta nên dùng:
map<int, int>
vector<int>
set<int>
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Tính chất nào đúng với map trong C++?
Duy trì thứ tự theo thời gian thêm phần tử
Tự động sắp xếp theo key tăng dần
Không sắp xếp các phần tử
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Giả sử có map
Gán giá trị "abc" cho key 3
Xóa key 3 khỏi map
Gây lỗi vì chưa khởi tạo map
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cách tốt nhất để kiểm tra một key tồn tại trong map là?
Dùng m[key]
Dùng m.find(key) != m.end()
Dùng m.count(key) > 1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu nào đúng để duyệt qua toàn bộ phần tử trong map
for(auto x : m)
for(int i = 0; i < m.size(); i++)
while(!m.empty())
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
Already have an account?
Similar Resources on Wayground
28 questions
ÔN TẬP TIN HỌC 6 HỌC KỲ 1
Quiz
•
6th - 9th Grade
26 questions
Grade 9- s2- a2- gimp
Quiz
•
6th - 12th Grade
26 questions
Informatyka
Quiz
•
5th - 12th Grade
27 questions
Chromebook Shortcuts
Quiz
•
2nd - 12th Grade
26 questions
Keyboard Letters
Quiz
•
1st - 12th Grade
30 questions
Formatting and Editing Vocabulary
Quiz
•
6th Grade
28 questions
ÔN TẬP KT HKII - TIN HỌC 6 (CÁNH DIỀU)
Quiz
•
6th Grade
32 questions
On-tap-GK2-Tin6
Quiz
•
6th Grade
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
