What is the output of the following code?
int main()
{
int x = 10, y = 5;
printf("%d", x + y * 2);
return 0;
}
Codigo
Quiz
•
Engineering
•
University
•
Medium
NAYANA B23CS1245
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the output of the following code?
int main()
{
int x = 10, y = 5;
printf("%d", x + y * 2);
return 0;
}
30
20
25
15
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the difference between ++i and i++ in C?
Both increment the value by 1 but ++i increments before the value is used, and i++ increments after.
Both increment the value by 1, but ++i increments after the value is used, and i++ increments before.
++i increases by 2, and i++ increases by 1.
There is no difference.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the value of i after the following loop?
int i;
for(i = 0; i < 10; i++) {
if (i == 5) {
break;
} }
4
5
10
9
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the static keyword do in C?
It makes a variable visible throughout the program.
It makes a function visible only within its file.
It ensures that a variable retains its value between function calls.
It makes a variable constant.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Who is known as the father of the computer?
Alan Turing
Charles Babbage
John Von Neumann
Bill Gates
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Who invented the concept of the first programmable computer?
John Atanasoff
Charles Babbage
Alan Turing
Konrad Zuse
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Who is known for developing the first successful theory of artificial intelligence(AI)?
Alan Turing
John McCarthy
Marvin Minsky
Claude Shannon
10 questions
Strings in python
Quiz
•
University
20 questions
C Programming Challenge for Students
Quiz
•
University
20 questions
Quiz Round For Group 1
Quiz
•
University
20 questions
Quiz Round For Group 2
Quiz
•
University
16 questions
Basic C Programming
Quiz
•
University
10 questions
Internal Lab Quiz-1 CSECS
Quiz
•
University
15 questions
Variables y constantes
Quiz
•
University
12 questions
Quiz on Variables and Arithmetic Operations
Quiz
•
12th Grade - University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade