
02/05/2025
Quiz
•
Computers
•
University
•
Hard
Dr Brahma
Used 1+ times
FREE Resource
Enhance your content
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve()
{ int x = 2, y = 2;
printf(x > y ? 'Greater': x == y ? 'Equal' : 'Lesser');
}
int main()
{
solve();
return 0;
}
Greater
Equal
Lesser
None of these
2.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
ARRAY matrix[2][3] SET matrix[0][0] TO 1, matrix[0][1] TO 2, matrix[0][2] TO 3, matrix[1][0] TO 4, matrix[1][1] TO 5, matrix[1][2] TO 6 PRINT matrix[1][2]
Prints 1
Prints 5
Prints 6
None of these
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The correct format of declaring a function is:
type_of_return name_of_function (argument type);
type_of_return name_of_function (argument type){}
type_of_return (argument type) name_of_function;
all of the above
4.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What is the output printed by the following program?
#include<stdio.h>
int f(int n, int k)
{
if (n == 0)
return 0;
else if (n % 2)
return f(n/2, 2*k) + k;
else return f(n/2, 2*k) - k;
}
int main ()
{
printf("%d", f(20, 1));
return 0;
}
5
8
9
20
5.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
Consider the following C-program :
int fun()
{
static int num = 16;
return num--;
}
int main()
{
for(fun(); fun(); fun())
printf("%d ", fun());
return 0;
}
Infinite loop
13 10 7 4 1
15 12 8 5 2
14 11 8 5 2
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In C, the program execution starts from?
printf()
scanf()
main()
getch()
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
C++ Bootcamp 2k24
Quiz
•
University
20 questions
Búsqueda en Inteligencia Artificial
Quiz
•
University
20 questions
Simulacro ADS1 EC2
Quiz
•
University
20 questions
Day 8 - Security I - 1st Review - Day 7 Review
Quiz
•
University
20 questions
9.4.25 Mentoring quiz
Quiz
•
University
20 questions
COA_QUIZ_UNIT I
Quiz
•
University
20 questions
DIVISIBILIDAD POR 2 - 5 Y 10
Quiz
•
1st Grade - University
20 questions
BD 1 - SQL - geral
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
22 questions
FYS 2024 Midterm Review
Quiz
•
University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
12 questions
1 Times Tables
Quiz
•
KG - University
20 questions
Disney Trivia
Quiz
•
University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University