C String

Quiz
•
English
•
University
•
Medium
Azrinna Muhamad
Used 18+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to read a string from the user?
gets()
puts()
printf()
scanf()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the puts() function do?
Reads a string from the user
Displays a string
Concatenates two strings
Reverses a string
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
Prints the entered string
Prints "Enter a string:"
Compilation error due to gets()
Runtime error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which header file is required for string handling functions in C?
stdio.h
stdlib.h
string.h
ctype.h
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h>
int main() {
char line[100];
printf("Enter a line of text: ");
_____(line);
printf("You entered: %s\n", line);
return 0;
}
Similar Resources on Wayground
10 questions
Exploring Triangle Properties with Pythagorean Challenges

Quiz
•
8th Grade - University
8 questions
C_PROG

Quiz
•
University
10 questions
Real-Life Applications of Sine & Cosine: Angles & Sides

Quiz
•
10th Grade - University
10 questions
Estimating and Converting Measurements in the Metric System

Quiz
•
5th Grade - University
8 questions
Exploring Pythagorean Theorem & Graphing Linear Equations

Quiz
•
8th Grade - University
10 questions
Musical Instrument Family

Quiz
•
1st Grade - University
10 questions
Affixes

Quiz
•
6th Grade - University
9 questions
Laying a pipeline

Quiz
•
University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

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

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade