
AN-2
Authored by Rishabh Tomar
Computers
12th Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
String is an array of characters with …….. character as the last element of array.
Null
Empty
0
1
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the format specifier used to print or read a character in an array in Printf or Scanf function?
%C
%f
%w
%c
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following function is more appropriate for reading in a multi-word string?
scanf()
gets()
printf()
puts()
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The library function used to copy a string to another is
strncpy()
strcmp()
strcpy()
strchr()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
String is initialized with datatype
float
char
int
double
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this program?
#include <stdio.h>
int main()
{
char str[] = "hello, world";
printf("%d", strlen(str));
}
Compilation error
10
13
12
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this
#include <stdio.h>
#include <string.h>
int main()
{
char s1[10] = "Hello";
char s2[10] = "World";
strncat(s1,s2, 3);
printf("Concatenation using strncat: %s", s1);
return 0;
}
Concatenation using strncat: Hel
Concatenation using strncat: HelloWorld
Concatenation using strncat: HelloWor
None of the above
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
17 questions
recap 12 miscellaneous H446 computer science
Quiz
•
12th Grade
18 questions
Python Pandas-Series
Quiz
•
12th Grade
15 questions
2D Arrays
Quiz
•
9th - 12th Grade
15 questions
Data Structures
Quiz
•
12th Grade
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
20 questions
Computer Science Explorations Final Review
Quiz
•
9th - 12th Grade
15 questions
PTS Algoritma dan Pemrograman
Quiz
•
9th - 12th Grade
19 questions
JavaScript Data Structures
Quiz
•
9th - 12th Grade
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