PROGRAMMING IN C - UNIT 3 MCQS

PROGRAMMING IN C - UNIT 3 MCQS

12th Grade

15 Qs

quiz-placeholder

Similar activities

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

POWERPOINT QUIZZ

POWERPOINT QUIZZ

10th - 12th Grade

20 Qs

ICT as Platform for Change

ICT as Platform for Change

11th - 12th Grade

10 Qs

emtech

emtech

12th Grade

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

Skill Competition Quiz 2024

Skill Competition Quiz 2024

10th Grade - University

20 Qs

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Coding Karel 2

Coding Karel 2

KG - University

20 Qs

PROGRAMMING IN C - UNIT 3 MCQS

PROGRAMMING IN C - UNIT 3 MCQS

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

MS.SHYAMALADEVI C

FREE Resource

AI

Enhance your content in a minute

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

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.

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?