
C Strings

Quiz
•
Computers
•
University
•
Hard
Sivakami R
Used 92+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
UC_TM02_C Programming Basics

Quiz
•
University - Professi...
16 questions
C/C++ Programming Chapter 2

Quiz
•
University
15 questions
quiz pertemuan 2 asik ddp

Quiz
•
University
17 questions
BCA101T - Problem Solving Quiz

Quiz
•
University
15 questions
Switch (Quiz - 4)

Quiz
•
University
20 questions
Programming in C(1)

Quiz
•
University
20 questions
C Programming Unit-1 Test-2

Quiz
•
University
13 questions
OOP evaluation

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University