20 dec 2023 SRMIST TRP CPS AN
Quiz
•
English
•
Professional Development
•
Practice Problem
•
Hard
CCC info@ccc.training
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Time complexity of the code? int fun(int n, int m, int o) { if (n <= 0) printf("%d, %d\n",m, o); else { fun(n-1, m+1, o); fun(n-1, m, o+1); }
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the time complexity of the following code? int fun(int x) { if (x <= 0) return 1; return 1 + fun(x-1); }
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the time complexity of the code? int fun(int x) { if (x <= 0) return 1; return 1 + fun(x/5); }
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int sumDigits(int n) { if (n == 0) return 0; else return n % 10 + sumDigits(n / 10); } int main() { printf("Sum of Digits: %d\n", sumDigits(123)); return 0; }
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
void show(int,int,int); int main() { int a = 1; show(++a, a++, a); return 0; } void show(int i, int j, int k) { printf("%d %d %d,\n", i, j, k); }
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h> int factorial(const int n) { if (n <= 1) return 1; else return n * factorial(n - 1); } int main() { printf("Factorial: %d\n", factorial(5)); return 0; }
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int mysteryFunction(int a, int b) { if (b == 0) return 1; else return a * mysteryFunction(a, b - 1); } int main() { printf("Mystery Function: %d\n", mysteryFunction(2, 3)); return 0; }
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
Already have an account?
Similar Resources on Wayground
20 questions
Eng-Ind: 3rd Attack
Quiz
•
1st Grade - Professio...
11 questions
Spider-man quiz
Quiz
•
KG - Professional Dev...
13 questions
GRAMMAR 1 - UNIT 2 - P.10, 11, 12, 13
Quiz
•
Professional Development
20 questions
Revision
Quiz
•
Professional Development
15 questions
Jabo Year End
Quiz
•
Professional Development
18 questions
SL2M4 - File 11A - Elementary WorkBook
Quiz
•
5th Grade - Professio...
12 questions
Logistics b1 u1-3
Quiz
•
Professional Development
14 questions
Final Evaluation- Deke Malloy Case
Quiz
•
Professional Development
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
