C Language Test - 2
Quiz
•
Computers
•
Professional Development
•
Hard
Divakar Bangaru
Used 5+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the range of values that can be stored by int datatype in C?
-(2^31) to (2^31) - 1
-256 to 255
-(2^63) to (2^63) - 1
0 to (2^31) - 1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
int main() {
int a = 3, b = 5;
int t = a;
a = b;
b = t;
printf("%d %d", a, b);
return 0;
}
3 5
3 3
5 5
5 3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is an array initialized in C language?
int a[3] = {1, 2, 3};
int a = {1, 2, 3};
int a[] = new int[3]
int a(3) = [1, 2, 3];
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
#include <stdio.h>
int main() {
int a[] = {1, 2, 3, 4};
int sum = 0;
for(int i = 0; i < 4; i++) {
sum += a[i];
}
printf("%d", sum);
return 0;
}
1
4
20
10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
int main() {
int sum = 2 + 4 / 2 + 6 * 2;
printf("%d", sum);
return 0;
}
2
15
16
18
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the 3rd element in an array accessed based on pointer notation?
*a + 3
*(a + 3)
(a + 3)
&(a + 3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How are String represented in memory in C?
An array of characters.
The object of some class.
Same as other primitive data types.
LinkedList of characters.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
QUIZZERIA (Round 1)
Quiz
•
Professional Development
20 questions
Unidad 2 - Introducción a la programacion - FP1A
Quiz
•
Professional Development
20 questions
Fundamentals I. Principio de módulo
Quiz
•
Professional Development
21 questions
БимБам♥
Quiz
•
Professional Development
22 questions
Java Chapter 2 Review Questions
Quiz
•
Professional Development
25 questions
Java Basics
Quiz
•
Professional Development
20 questions
Round-1 Technical Aptitude
Quiz
•
11th Grade - Professi...
20 questions
Dev Web Java / Angular
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
