
C Strings
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Sivakami R
Used 93+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
BASIC C PROGRAMMING QUIZ
Quiz
•
University
21 questions
SAINS KOMPUTER TINGKATAN 4 (BAB1)
Quiz
•
KG - University
20 questions
C PROGRAMMING LANGUAGE
Quiz
•
University
16 questions
Lógica de Programação
Quiz
•
University
20 questions
basisdata1
Quiz
•
University
20 questions
ASK : : KOD ARAHAN
Quiz
•
10th Grade - Professi...
13 questions
ÔN TẬP C - mảng 1 chiều
Quiz
•
University
12 questions
Operators in C
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
