C++: Xâu kí tự

C++: Xâu kí tự

8th Grade

25 Qs

quiz-placeholder

Similar activities

Trắc nghiệm excel - 1

Trắc nghiệm excel - 1

KG - University

20 Qs

Quiz informatyczny

Quiz informatyczny

1st - 8th Grade

15 Qs

Algorithms

Algorithms

7th - 10th Grade

15 Qs

Class VIII Computer Quiz

Class VIII Computer Quiz

8th Grade

15 Qs

ôn làm việc với dãy số

ôn làm việc với dãy số

8th Grade

15 Qs

Ôn tập kỳ 2 tin 6

Ôn tập kỳ 2 tin 6

1st - 12th Grade

15 Qs

Python Year 9 Quiz

Python Year 9 Quiz

8th - 10th Grade

19 Qs

Payment Gateways

Payment Gateways

8th Grade

20 Qs

C++: Xâu kí tự

C++: Xâu kí tự

Assessment

Quiz

Computers

8th Grade

Practice Problem

Medium

Created by

Luong Huong

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Có bao nhiêu xâu kí tự hợp lệ:

1) “123_@##”

2) “hoa hau”

3) “346h7g84jd”

4) python

5) “01028475”

6) 123456

5

6

4

3

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Xâu “1234%^^%TFRESDRG” có độ dài bằng bao nhiêu?

16

17

18

15

Answer explanation

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Khẳng định nào sau đây là sai khi nói về xâu:

Trong C++, độ dài xâu là vô hạn bộ nhớ và không cần khai báo độ dài xâu từ trước.

Trong C++, các kí tự của xâu được đánh số thứ tự bắt đầu từ 0

Với dữ liệu kiểu xâu có thể thực hiện phép toán ghép xâu và các phép toán quan hệ.

Phép ghép xâu, kí hiệu là dấu cộng (+) được sử dụng để ghép nhiều xâu thành 1.

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Kết quả của chương trình sau là bao nhiêu?

string s = "abcdefg";

cout << s[2];

‘c’

‘b’

‘a’

‘d’

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Xâu rỗng là xâu có độ dài bằng bao nhiêu?

1

2

0

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Cho s = "123456789", sau khi thực hiện lệnh s.erase(3, 4) thì biến s chứa giá trị nào sau đây:

“12789”

“1256789”

“12389”

Xâu rỗng

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Để xóa đi kí tự đầu tiên của xâu s ta viết:

s.erase(1, 1);

s.erase(s.length(), 1);

s.erase(0, 1);

s.erase(1, i);

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?