
Sessional 2 A3
Authored by Gunjan Verma
Computers
University
Used 3+ 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
20 sec • 1 pt
What will be the output of this code?
int x = 5;
printf("%d %d %d", x++, ++x, x);
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will happen if you write the following declaration in C?
const int x = 10;
int *ptr = &x;
*ptr = 20;
printf("%d", x);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about variable scope in C?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does C interpret the expression int x = (int *) malloc(sizeof(int));?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following switch cases is invalid?
switch (x) {
case 1.5: printf("Float\n"); break;
case 'a': printf("Char\n"); break;
case 3: printf("Int\n"); break;
}
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider this code:
for (int i = 0; i < 5; i++)
{
if (i == 3) break;
}
printf("%d", i);
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the output of the following recursive function be?
int func(int n)
{
if (n == 0) return 0; return n + func(n - 1);
}
printf("%d", func(4));
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
Human Computer Interaction (HCI)
Quiz
•
University
20 questions
Infrastructure (Network)
Quiz
•
University
20 questions
C Quest 2.0
Quiz
•
University
15 questions
IT 209
Quiz
•
University
20 questions
PHP First Internal Practical Viva
Quiz
•
University
15 questions
Assessment 08
Quiz
•
University
15 questions
Monday Week#2
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University