Search Header Logo

Hàm 2

Authored by Edu TSmart

Computers

6th Grade

Used 6+ times

Hàm 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào sau đây thêm phần tử vào map m?

m.insert({3, "Hello"});

m.push(3, "Hello");

m.add(3, "Hello");

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu nào là cách thêm giá trị "A" vào key "name" trong map m?

m["name"] = "A";

m.at("name") = "A";

m.insert("name", "A");

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Khi thêm phần tử bằng insert(), nếu key đã tồn tại thì điều gì xảy ra?

Ghi đè giá trị cũ

Không thay đổi map

Xóa key đó

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

m[10] = 100; trong map m; có tác dụng gì?

Cập nhật key 10 với giá trị 100

Xóa key 10

Không hợp lệ

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu nào sau đây là thêm đúng vào unordered_map u?

u["A"] = 10;

u.insert(10, "A");

u.push_back("A", 10);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh nào đúng để tăng giá trị của key 7 thêm 1 trong map m?

m[7] += 1;

m[7] = m[7] + 1;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Để cập nhật m["x"] = "y" trong map m, cần điều kiện gì?

Key "x" đã có trước

Không cần điều kiện, sẽ tự động tạo nếu chưa có

Key "x" không tồn tại mới cập nhật

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?