
PIC 2024
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
prapulla shivraj
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h>
struct School
{ int age, rollNo; };
void solve()
{ struct School sc; sc.age = 19; sc.rollNo = 82; printf("%d", (int)sizeof(sc)); }
int main()
{ solve();
return 0; }
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h> #include<string.h> void sol() { char s[] = "Hello"; printf("%s ", s); char t[40]; strcpy(t, s); printf("%s", t); } int main() { sol(); return 0; }
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h> #include<stdlib.h> void set(int to) { to = (int)malloc(5 sizeof(int)); } void solve() { int ptr; set(ptr); ptr = 10; printf("%d", ptr); } int main() { solve(); return 0; }
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h> int search(int l, int r, int target, int a[]) { int mid = (l + r) / 2; if(a[mid] == target) { return mid; } else if(a[mid] < target) { return search(mid + 1, r, target, a); } else { return search(0, mid - 1, target, a); } } void binsearch() { int a[] = {1, 2, 3, 4, 5}; printf("%d", search(0, 5, 3, a)); } int main() { binsearch(); return 0; }
0
2
4
1
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h> int get(int n) { if(n <= 1) { return n; } return get(n - 1) + get(n - 2); } void solve() { int ans = get(6); printf("%d", ans); } int main() { solve(); return 0; }
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h> void solve(int x) { if(x == 0) { printf("%d ", x); return; } printf("%d ", x); solve(x - 1); printf("%d ", x); } int main() { solve(3); return 0; }
a) 3 2 1 0 1 2 3
b) 3 2 1 0
c) 0 1 2 3
d) None of the above
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
#include <stdio.h> #define VAL 5 int getInput() { return VAL; } void solve() { const int x = getInput(); printf("%d", x); } int main() { solve(); return 0; }
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
Minggu V - PKS 2 - Pemrograman C++
Quiz
•
University
10 questions
Structure Data Review
Quiz
•
University - Professi...
10 questions
Third Year Placement Training Revision Test
Quiz
•
University
12 questions
Test 02 - Basics of Web Design
Quiz
•
University
18 questions
C Language 101
Quiz
•
University
15 questions
Microcontroller
Quiz
•
University
10 questions
pointers and structures
Quiz
•
University
15 questions
ASK T3 2.1 Kriptografi dalam Keselamatan Data
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
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
