
PROGRAMMING IN C - UNIT 3 MCQS

Quiz
•
Computers
•
12th Grade
•
Hard
MS.SHYAMALADEVI C
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Higher SDD Revision

Quiz
•
11th - 12th Grade
10 questions
String Methods

Quiz
•
9th - 12th Grade
20 questions
Unit 6 ArrayLists and String Methods

Quiz
•
9th - 12th Grade
18 questions
GCSE Computer Science Data types

Quiz
•
10th - 12th Grade
10 questions
Jenis Data

Quiz
•
7th - 12th Grade
15 questions
Topic 3 & 4 Practice - ArrayList and String Methods

Quiz
•
12th Grade
15 questions
Latihan UPS2

Quiz
•
5th - 12th Grade
15 questions
JavaScript String Methods

Quiz
•
12th Grade - Professi...
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University