
C++: Xâu kí tự
Authored by Luong Huong
Computers
8th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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

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
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
19 questions
KEYBOARDING TECHNIQUE
Quiz
•
5th - 8th Grade
20 questions
Bài tập tổng hợp 1_K3
Quiz
•
3rd Grade - University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
20 questions
Earth Day 2020
Quiz
•
6th - 8th Grade
20 questions
KIỂM TRA 15P TIN 7 (18-23/10-2022)
Quiz
•
6th - 9th Grade
25 questions
Photoshop
Quiz
•
7th - 8th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Laws of Exponents
Quiz
•
8th Grade
11 questions
Valentines Day
Quiz
•
6th - 8th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
25 questions
7th Reading STAAR Vocabulary
Quiz
•
6th - 8th Grade
25 questions
Valentine's Day Trivia
Quiz
•
8th Grade