
OOPS quiz-1

Quiz
•
Computers
•
University
•
Medium
devadevendran 28
Used 12+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the use of the scope resolution operatot "::" in c++?
To access the global variable
To print the output
To get input from the user
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Which part of a code will be read first by compiler in c++?
User defined function
Main function
Header files
All the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the name of the following line which is used to include header files into your program in c++
(#include< >)
Compiler directive
Include statement
Preprocessor directive
All the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Variable names in the programming language can be created with numbers in the beginning
eg: int 1num = 4
True
False
Answer explanation
A variable name cannot begin with a number because the could confuse it with a numeric value
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following word is not actually a key word in c++?
int
if
revert
mutable
6.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What will be the output of the following c++ code if the value of n is assigned as 5?
0 1 2 3 4 5
0 1 2 3 4
0 1 2 3
None of the above
Answer explanation
goto is one of the jump statement which is also used to transfer the control flow from one part of the program to another.
Syntax for goto statement:
goto label_name;
// ......
.
.
.
.
label_name:
// code that will be executed next
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following will be executed first when you run your code?
All the above
user-defined function
built-in function
main function
Answer explanation
Compilers always reads your code from top starting from header files all the way to the bottom as you have written it.
But it always execute the code written inside the main function first.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Python Quiz 1.4

Quiz
•
University
13 questions
C programming-1

Quiz
•
University
10 questions
Chapter 2 Java Basic2

Quiz
•
University
10 questions
C++ operator overloading

Quiz
•
University
10 questions
exception

Quiz
•
University
12 questions
MS Core Java Quiz-2 2023

Quiz
•
University
10 questions
java quiz based on interface

Quiz
•
University
10 questions
Structure of Java Program

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