
Essentials of C and C++ Programming
Authored by Dileep Kumar Sahu
World Languages
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary difference between C and C++?
C uses classes; C++ does not support classes.
C is a high-level language; C++ is low-level.
C is used for system programming; C++ is only for web development.
C is procedural; C++ supports object-oriented programming.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the concept of pointers in C.
Pointers automatically manage memory without programmer intervention.
Pointers are used to store string literals directly.
Pointers are variables that hold the memory address of another variable, enabling dynamic memory management and efficient data handling.
Pointers can only point to integer variables.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the advantages of using C++ over C?
C is better for object-oriented programming than C++.
C++ has a simpler syntax than C.
C does not support templates or function overloading.
C++ supports object-oriented programming, function overloading, templates, and a richer standard library.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Define the term 'class' in C++.
A class in C++ is a type of variable that only holds integers.
A class in C++ is a built-in data type that cannot contain functions.
A class in C++ is a collection of unrelated functions and variables.
A class in C++ is a user-defined data type that encapsulates data and functions.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a constructor in C++?
A constructor is used to delete objects in C++.
A constructor is a special member function in C++ that initializes objects.
A constructor is a function that returns a value.
A constructor is a type of variable in C++.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in C?
var num: int;
declare int num;
To declare a variable in C, use the syntax: type variable_name; e.g., int num;.
int num = new;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'main' function in C/C++?
The 'main' function is responsible for compiling the program.
The 'main' function handles memory allocation in C/C++.
The 'main' function is used for defining global variables.
The 'main' function is the entry point of a C/C++ program.
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?