
PIC 2024

Quiz
•
Computers
•
University
•
Hard
prapulla shivraj
FREE Resource
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; }
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
exception

Quiz
•
University
16 questions
UC_TM03_Arrays_Functions

Quiz
•
University - Professi...
13 questions
C programming-1

Quiz
•
University
10 questions
Array in C

Quiz
•
University
10 questions
Arrays

Quiz
•
11th Grade - University
15 questions
C Language Quiz-1

Quiz
•
University - Professi...
10 questions
Input And Output in C

Quiz
•
University
15 questions
Java Method

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University