WOMANIA PRELIMS
Quiz
•
Computers
•
Professional Development
•
Hard
Naafiah Yusra
Used 6+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
for(int i = 0; i < 5; i++) {
if(i % 2 == 0) {
sum += *(a + i);
}
else {
sum -= *(a + i);
}
}
printf("%d", sum);
}
int main() {
solve();
return 0;
}
2
15
Syntax error
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the disadvantage of arrays in C?
The amount of memory to be allocated should be known beforehand.
Elements of an array can be accessed in constant time.
Elements are stored in contiguous memory blocks.
Multiple other data structures can be implemented using arrays.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int a = 3;
int res = a++ + ++a + a++ + ++a;
printf("%d", res);
}
int main() {
solve();
return 0;
}
12
25
20
18
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If p is an integer pointer with a value 1000, then what will the value of p + 5 be?
1020
1005
1004
1010
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of the following code snippet?
#include <stdio.h>
void solve() {
char ch[10] = "abcdefghij";
int ans = 0;
for(int i = 0; i < 10; i++) {
ans += (ch[i] - 'a');
}
printf("%d", ans);
}
int main() {
solve();
return 0;
}
45
36
20
100
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a storage class specifier in C?
Volatile
Extern
typedef
Static
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What kind of linked list is best to answer questions like “What is the item at position n?”
Singly linked list
Doubly linked list
Circular linked list
Array implementation of linked list
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
unit test i sem jamia
Quiz
•
Professional Development
20 questions
Pre-survey - Maximizing Google Tools Workshop
Quiz
•
Professional Development
20 questions
ISACA Cyber Security Quiz - Prelims
Quiz
•
Professional Development
20 questions
Quiz 2- Entrada, Saída e Variáveis
Quiz
•
Professional Development
20 questions
Mobile and Operating Systems
Quiz
•
Professional Development
20 questions
Exploratory Data Analysis
Quiz
•
Professional Development
20 questions
RAS QUIZ
Quiz
•
Professional Development
20 questions
2021 SAT Christmas Party
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
20 questions
Context Clues: Multiple Meaning Words
Quiz
•
Professional Development
18 questions
Do or Does
Quiz
•
Professional Development
31 questions
Servsafe Food Manager Practice Test 2021- Part 1
Quiz
•
9th Grade - Professio...
