Hàm 1

Hàm 1

6th Grade

31 Qs

quiz-placeholder

Similar activities

Векторний редактор Inkscape. Створення складних зображень.

Векторний редактор Inkscape. Створення складних зображень.

6th - 9th Grade

27 Qs

aaazzzaaa

aaazzzaaa

4th Grade - University

27 Qs

HK 2 LỚP 7 NĂM 23-24

HK 2 LỚP 7 NĂM 23-24

6th - 8th Grade

29 Qs

CTE Numeric Keypad

CTE Numeric Keypad

6th - 8th Grade

31 Qs

WORD lesson 1 part 2

WORD lesson 1 part 2

6th Grade

34 Qs

Tin học 10_Luyện tập_Chủ đề Thông tin và dữ liệu

Tin học 10_Luyện tập_Chủ đề Thông tin và dữ liệu

6th - 12th Grade

32 Qs

STEM Architect terms

STEM Architect terms

5th - 8th Grade

28 Qs

Coding Diagnostic

Coding Diagnostic

6th - 12th Grade

28 Qs

Hàm 1

Hàm 1

Assessment

Quiz

Computers

6th Grade

Practice Problem

Medium

Created by

Edu TSmart

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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 m;, câu lệnh m[3] = "abc"; sẽ:

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 m?

for(auto x : m)

for(int i = 0; i < m.size(); i++)

while(!m.empty())

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?