
PROGRAMMING IN C - UNIT 3 MCQS
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
MS.SHYAMALADEVI C
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a character array in C?
A character array is used to store floating-point numbers.
A character array is a type of integer array.
A character array is a single character variable.
A character array in C is a sequence of characters used to store strings, defined as 'char arrayName[size];'.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a string in C?
char stringName = 'Your string here';
string stringName = 'Your string here';
char stringName[] = "Your string here";
char *stringName = 'Your string here';
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between a character array and a string.
A string is a fixed-size array, whereas a character array can change size dynamically.
Strings can only contain letters, while character arrays can contain any data type.
A character array is a type of string.
A character array is a raw collection of characters, while a string is a character array with additional properties and functions.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to find the length of a string in C?
getLength
lengthOfString
strlength
strlen
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you copy one string to another in C?
Use copy(destination, source);
Use strcpy(destination, source);
destination = source;
strncpy(destination, source, length);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `strcat` function?
To find the length of a string.
To split a string into characters.
To concatenate two strings.
To convert a string to uppercase.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you compare two strings in C?
Use strcmp(string1, string2) to compare two strings.
Check if string1 == string2 for comparison.
Use str_compare(string1, string2) to compare two strings.
Use string1.equals(string2) to compare two strings.
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
10 questions
BÀI 8. SẮP XẾP VÀ LỌC DỮ LIỆU
Quiz
•
1st - 12th Grade
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
20 questions
REMEDI PAS - DESAIN DAN KOMP. GRAFIS
Quiz
•
12th Grade
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
12 questions
Quizz Internet
Quiz
•
KG - Professional Dev...
10 questions
Les variables sous Python
Quiz
•
10th - 12th Grade
15 questions
Dasar Desain Grafis
Quiz
•
12th Grade - University
12 questions
Tecnología Digital
Quiz
•
12th Grade
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
