
C++: Xâu kí tự

Quiz
•
Computers
•
8th Grade
•
Medium
Luong Huong
Used 3+ times
FREE Resource
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);
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Trắc nghiêm tin học 8- Bài9a-Tạo đầu trang, chân trang

Quiz
•
8th Grade
15 questions
Quiz về Định dạng kí tự và Bố trí hình ảnh trong văn bản

Quiz
•
5th Grade - University
18 questions
Đề Cương ôn tập hk2 Tin học 8

Quiz
•
8th Grade
20 questions
ĐÁP ÁN KTTX số 1 - Tin 7 - HK2 - NH: 24 -25

Quiz
•
1st Grade - University
17 questions
IC3 GS6 Level 1 - BÀI 24: MICROSOFT WORD

Quiz
•
6th - 8th Grade
23 questions
ÔN TẬP HK II TIN 8

Quiz
•
8th Grade
21 questions
Ôn tập

Quiz
•
8th Grade
20 questions
ÔN TẬP CUỐI HKII_TIN 8

Quiz
•
8th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
22 questions
College Terms

Quiz
•
8th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
32 questions
Keyboarding

Quiz
•
8th Grade
10 questions
Google Drive

Quiz
•
6th - 8th Grade
10 questions
Acceptable Use of Technology

Quiz
•
7th - 8th Grade