Search Header Logo

C Working with String Element

Authored by Azrinna Muhamad

Other

University

Used 3+ times

C Working with String Element
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which header file must be included to use string functions?

#include<stdio.h>

#include<stdin.h>

#include<string.h>

#include<ctype.h>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to show text on the screen?

printf( )

scanf( )

sscanf( )

gets( )

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to read a string from the user, including spaces?

scanf( )

fgets( )

puts( )

printf( )

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

char name[10] = "Ali";

puts(name);

"Ali"

Ali

name

"Ali";

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is gets( ) not recommended in modern C programming?

It is too slow

It requires string.h

It cannot read input

It causes buffer overflow and is unsafe

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?