C String

C String

University

5 Qs

quiz-placeholder

Similar activities

String Art Techniques and Challenges

String Art Techniques and Challenges

12th Grade - University

9 Qs

Musical Instrument Family

Musical Instrument Family

1st Grade - University

10 Qs

Slope Calculations and Line Equations for Grade 8

Slope Calculations and Line Equations for Grade 8

8th Grade - University

10 Qs

MD2-19.1- Xử lý chuỗi

MD2-19.1- Xử lý chuỗi

University

10 Qs

Linear Functions: Write Equations & Solve Real-World Problems

Linear Functions: Write Equations & Solve Real-World Problems

8th Grade - University

10 Qs

MATILEO - Rachel's Blind Date

MATILEO - Rachel's Blind Date

University

6 Qs

Quiz

Quiz

University

4 Qs

C String

C String

Assessment

Quiz

English

University

Medium

Created by

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

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;

}

Discover more resources for English