
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
15 questions
Coding club Summit Online Quiz

Quiz
•
University
20 questions
Programming in C(1)

Quiz
•
University
20 questions
Pointers

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

Quiz
•
University
20 questions
C Quest 2.0

Quiz
•
University
20 questions
1st Year quiz

Quiz
•
University
20 questions
C - Strings

Quiz
•
University
11 questions
C Language

Quiz
•
10th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade