C Strings

C Strings

University

16 Qs

quiz-placeholder

Similar activities

C Quiz

C Quiz

University

12 Qs

PROGRAMMING CAMP

PROGRAMMING CAMP

University

20 Qs

CS 11:QUIZ#2 (Basic Computer Programming)

CS 11:QUIZ#2 (Basic Computer Programming)

University

20 Qs

Java Quiz2

Java Quiz2

University

11 Qs

Лекция 15. Контейнеры STL

Лекция 15. Контейнеры STL

University

12 Qs

POO_BasicoyJava

POO_BasicoyJava

University

20 Qs

Array - Data Structures

Array - Data Structures

University

15 Qs

C++ Assesment 1

C++ Assesment 1

University

20 Qs

C Strings

C Strings

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Sivakami R

Used 93+ times

FREE Resource

AI

Enhance your content in a minute

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

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following program?

#include <stdio.h>


int main()


{


char str1[] = "Sona BME";


char str2[] = "Sona BME";


printf("%d" ,(strcmp(str1, str2)));


}

0

1

-1

error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following program?

#include <stdio.h>


int main()


{

char str1[] = "Salem";


char str2[] = "Bangalore";


printf("%d" ,(strcmp(str1, str2)));


}

0

-1

1

Compile time Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following program?

#include <stdio.h>


int main()


{

char str1[] = "Australia";


char str2[] = "India";


printf("%d" ,(strcmp(str1, str2)));


}

0

-1

1

run time error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output of the following program?

#include <stdio.h>

int main()

{

char str1[] = "College";

char str2[] = "University";

strcpy(str1, str2);

printf("%s", str1);

}

College

University

College University

University College

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output of the following program?

#include <stdio.h>

int main()

{

char str1[] = " Sona College";

char str2[] = "Sona University";

strcpy(str1, str2);

printf("%s", str2);

}

Sona College

Sona University

Sona College Sona University

Sona University Sona College

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be thee output of the following program?

#include <stdio.h>

int main()

{

char str[] = " Have a Good Day ! ";

printf("%d", strlen(str));

}

20

13

19

18

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

#include <stdio.h>

int main()

{

char str1[] = "BioMedical ";

char str2[] = "Engineering";

strcat(str1, str2);

printf("%s ", str1);

}

BioMedical

BioMedical Engineering

BioEngineering

Engineering

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?

Discover more resources for Computers