
SJIT ECE PRACTICE TEST HCL @ 13/3/24
Authored by DINESH ADIKESAVAN
Professional Development
Professional Development
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 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>
int main()
{
int a = 3,
b = 5;
int t = a;
a = b;
b = t;
printf("%d %d", a, b);
return 0;
}
5 3
3 3
3 5
5 5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
#include <stdio.h>
int main()
{
int a[] = {1, 2, 3, 4};
int sum = 0;
for(int i = 0; i < 4; i++) { sum += a[i];
}
printf("%d", sum);
return 0;
}
1
4
10
20
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
int main()
{
int sum = 2 + 4 / 2 + 6 * 2;
printf("%d", sum);
return 0;
}2
15
16
18
4.
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
3
syntax error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int first = 10, second = 20;
int third = first + second;
{
int third = second - first;
printf("%d ", third);
}
printf("%d", third);
}
int main() {
solve();
return 0;
}10 30
30 10
10 20
20 10
6.
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
20
24
18
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value of x in the following code snippet?
#include <stdio.h>
void solve() {
int x = printf("Hello");
printf(" %d", x);
}
int main() {
solve();
return 0;
}10
5
1
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
25 questions
core java 2
Quiz
•
Professional Development
21 questions
B2 low Quiz (Units 1-2)
Quiz
•
Professional Development
20 questions
Intro to UNCLOS
Quiz
•
Professional Development
15 questions
Basic business terms
Quiz
•
Professional Development
16 questions
M20_Review (Accounts Receivable and Funds Handling)
Quiz
•
Professional Development
17 questions
Customer Service: Mindset
Quiz
•
Professional Development
15 questions
CI Ops - Systematic Plans (PACs)
Quiz
•
Professional Development
15 questions
python dictionary and set
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade