Cú pháp nào sau đây đúng để khai báo một chuỗi ký tự trong C?

Quizziz - Chuỗi ký tự trong C

Quiz
•
Instructional Technology
•
9th - 12th Grade
•
Hard
Quý Ngọ
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
char str[] = "Hello"
char str = "Hello";
char str{6} = "Hello"
str = "Hello"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hàm nào sau đây được sử dụng để lấy độ dài của chuỗi trong C?
length()
strlen()
strlength()
size()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi khai báo một chuỗi ký tự, ký tự nào được tự động thêm vào cuối chuỗi?
\r
\0
\n
\t
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hàm nào dùng để so sánh hai chuỗi trong C?
strcompare()
strcmp()
strcomp()
compare()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Nếu bạn khai báo một chuỗi như sau: char str[10] = "Hello";
Kích thước của mảng str là bao nhiêu?
6
5
10
11
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả trả về từ đoạn mã trên là gì?
In ra nội dung
"Length of str: 10"
Lỗi biên dịch
null
In ra nội dung
"Length of str: 14"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn mã sau sẽ in ra gì: printf("%s", "Hello"[1]);?
H
e
l
Lỗi biên dịch
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
ปลายภาค2-2568

Quiz
•
11th Grade
16 questions
Intro to Coding Week 4

Quiz
•
9th - 12th Grade
19 questions
tạch tạch tạch

Quiz
•
11th Grade
13 questions
ÔN TẬP CHƯƠNG 1: MẠNG MÁY TÍNH

Quiz
•
9th Grade
20 questions
EXCEL TRAINING 2024 ITC PTBĐ

Quiz
•
12th Grade
10 questions
Latihan Pra PTS Genap

Quiz
•
10th Grade
16 questions
Ôn Tập Tin Học Khối 4

Quiz
•
4th Grade - University
20 questions
Functions Basic

Quiz
•
8th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Instructional Technology
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade