C String

C String

University

5 Qs

quiz-placeholder

Similar activities

Anglo-Saxon Literature

Anglo-Saxon Literature

University

10 Qs

Fun with Adding and Subtracting Lengths in Measurement!

Fun with Adding and Subtracting Lengths in Measurement!

2nd Grade - University

10 Qs

TEACHING METHODS

TEACHING METHODS

University

10 Qs

THE COLDEST PLACE ON EARTH

THE COLDEST PLACE ON EARTH

University

10 Qs

Reading about Televisions

Reading about Televisions

6th Grade - Professional Development

10 Qs

How Eco Friendly Are You?

How Eco Friendly Are You?

University

10 Qs

Words game

Words game

9th Grade - Professional Development

10 Qs

MS Excel - Day 05

MS Excel - Day 05

University

10 Qs

C String

C String

Assessment

Quiz

English

University

Practice Problem

Medium

Created by

Azrinna Muhamad

Used 20+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

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;

}

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?