Code-A-Vita
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
CODE-A-VITA CODE-A-VITA
Used 4+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The variable a is not initialized correctly.
The variable b is not declared correctly.
The variable c is not initialized correctly.
The variable d is not declared correctly.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The condition in the for loop is incorrect.
The semicolon ; at the end of the for loop line makes the loop body empty
The printf statement is outside the loop, so it will only print number 6.
The variable i is not initialized properly.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Syntax error in the printf statement
Division by zero error
Incorrect variable type declaration
No error in the code
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The loop condition is incorrect, causing an off-by-one error.
There is no error; the program will always print "Sum is exactly 1.0".
The comparison sum == 1.0 is incorrect due to the nature of floating-point arithmetic.
The variable sum should be of type double for the summation to be accurate.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Change the function declaration to int sqr(int n);
Change the function call in main to result = square(number);
Change the function definition to int sqr(int n) { return n * n; }
Change the printf statement to printf("The square of %d is %d.\n", number, square);
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The MAX macro is incorrectly defined.
The MAX macro does not need parentheses.
The printf statement is incorrect.
There is no error in the code.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The pointer p is not initialized correctly.
The statement *p = a + 5; is incorrect and will not compile.
There is no error in the code; it will print "The value of a is: 15".
The printf statement uses the wrong format specifier.
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
Already have an account?
Similar Resources on Wayground
15 questions
Computer and Other Human Inventions
Quiz
•
University
20 questions
Input/Output
Quiz
•
University
15 questions
Robotics Prelim
Quiz
•
University
20 questions
Digital and Analog transmission
Quiz
•
University
15 questions
GIS Unit III
Quiz
•
University
15 questions
ADB Quiz #1
Quiz
•
University
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms
Quiz
•
12th Grade - University
20 questions
Quiz Harian Gdevelop MPK
Quiz
•
University
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
10 questions
Identifying equations
Quiz
•
KG - University
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
HS2C2 AB QUIZIZZ
Quiz
•
1st Grade - Professio...
14 questions
Homonyms Quiz
Quiz
•
KG - University
16 questions
Parts of a Parabola
Quiz
•
8th Grade - University
10 questions
A Brief History of Geologic Time
Interactive video
•
11th Grade - University
15 questions
Black Friday/Cyber Monday
Quiz
•
9th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
