Deck 15: A Brief Introduction to C++

ملء الشاشة (f)
exit full mode
سؤال
The basic mathematical and assignment operators in C++ are different from those used in C.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Format manipulators are used in C++ to obtain formatted output.
سؤال
C++ does not allow the use of pointers for indirect addressing.
سؤال
C++ allows the use of references for indirect addressing.
سؤال
C++ uses object-oriented program design.
سؤال
C uses procedural program design.
سؤال
C was created from C++.
سؤال
C++ is sometimes referred to as "a better C".
سؤال
Many introductory C++ courses are taught using procedural programs initially.
سؤال
/* this is a comment */ is not a valid C++ comment.
سؤال
Any text after the \\ delimiter, but only to the end of the current line, is taken to be a comment in C++.
سؤال
The header files in C++ are different from those in C, but perform the same task and occupy similar positions in a C++ program that they occupy in a C program.
سؤال
C++'s cin does not require the address operator needed for C's scanf() function.
سؤال
C++ uses newl to signify a new line.
سؤال
One of the driving forces in the creation of object-oriented languages was the inability of procedurally structured code to be extended easily without extensive revisions, retesting, and reevaluations.
سؤال
Object-oriented languages make it easier to reuse code in a manner that significantly increases software productivity.
سؤال
A data type provides both a set of values and a set of operations that can be applied to these values.
سؤال
A programmer-defined data type is known as an ADT.
سؤال
In a class, values defined for the data type can only be accessed and operated on by functions specified as part of the class.
سؤال
Polymorphism permits existing code, which has been thoroughly tested, to be reused efficiently without the need for extensive retesting.
سؤال
A parent class is also called a derived class.
سؤال
A derived class is also called a child class.
سؤال
Using polymorphism, existing operations on a base class can be left alone, without the need to retest and reverify them, while they are extended to a derived class.
سؤال
C++ is a true object-oriented language.
سؤال
In a true object-oriented language all programs would have to adhere to an object-oriented structure.
سؤال
Use ____ to include standard input and output header files in a C program.

A)#include
B)using namespace std;
C)#include
D)#include
سؤال
Use ____ to include standard input and output header files in a C++ program.

A)#include
B)using namespace std;
C)#include using namespace std;
D)#include
سؤال
You can use ____ for standard input in C.

A)scanf()
B)read()
C)cin
D)cout
سؤال
You can use ____ for standard input in C++.

A)sscanf()
B)read()
C)cin
D)cout
سؤال
You can use ____ for standard output t in C.

A)write()
B)printf()
C)cin
D)cout
سؤال
You can use ____ for standard output in C++.

A)write()
B)sprintf()
C)cin
D)cout
سؤال
An example of a use of cin is ____.

A)cin >> price;
B)cin -> price;
C)cin << price;
D)cin < price;
سؤال
An example of a use of cout is ____.

A)cout >> "Hello World";
B)cout -> "Hello World";
C)cout << "Hello World";
D)cout < "Hello World";
سؤال
The use of format manipulators in C++ requires the header file ____.

A)iostream
B)iomanip
C)namespace
D)std
سؤال
____ can be used instead of '\n' in C++.

A)'\0'
B)'\N'
C)newl
D)endl
سؤال
____ is a C++ format manipulator.

A)iostream
B)endl
C)fixed
D)cout
سؤال
____ is not a comment delimiter in C++.

A)/*
B)*/
C)//
D)\\
سؤال
printf("Enter the price: "); can be written in C++ as ____.

A)cout << "Enter the price: ";
B)cout >> "Enter the price: ";
C)cin << "Enter the price: ";
D)cin >> "Enter the price: ";
سؤال
scanf("%lf", &price); can be written in C++ as ____.

A)cin << &price;
B)cin << price;
C)cin >> &price;
D)cin >> price;
سؤال
/* this is a comment */ can be written in C++ as ____.

A)\\ this is a comment
B)// this is a comment
C)/ this is a comment /
D)*/ this is a comment /*
سؤال
C++'s endl is equivalent to C's newline sequence '\n' followed by a(n) ____ function call.

A)flush()
B)force()
C)print()
D)out()
سؤال
The three features required for an object-oriented language are class construction, inheritance, and ____.

A)operator overloading
B)polymorphism
C)abstraction
D)encapsulation
سؤال
____ is the ability to create programmer-defined data types.

A)Polymorphism
B)Inheritance
C)Class construction
D)Encapsulation
سؤال
A ____ is a completely new data type that incorporates all of the data values and operations of one class with new data and operations that create a different and expanded class.

A)class instance
B)base class
C)specific class
D)derived class
سؤال
When using inheritance, the initial class is known as the ____.

A)parent class
B)child class
C)subclass
D)derived class
سؤال
When using inheritance, the derived class is known as the ____.

A)parent class
B)base class
C)subclass
D)initial class
سؤال
____ permits the same operation to invoke one set of results on data values of a base class and a different set of results on data values of a derived class.

A)Polymorphism
B)Inheritance
C)Class construction
D)Encapsulation
سؤال
Generic data types are available in C++ through the ____ library.

A)iostream
B)iomanip
C)STD
D)STL
سؤال
C++ is sometimes known as a(n) ____ language.

A) interpreted
C) virtual
B) hybrid
D) procedural
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/49
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 15: A Brief Introduction to C++
1
The basic mathematical and assignment operators in C++ are different from those used in C.
False
2
Format manipulators are used in C++ to obtain formatted output.
True
3
C++ does not allow the use of pointers for indirect addressing.
False
4
C++ allows the use of references for indirect addressing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
5
C++ uses object-oriented program design.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
6
C uses procedural program design.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
7
C was created from C++.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
8
C++ is sometimes referred to as "a better C".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
9
Many introductory C++ courses are taught using procedural programs initially.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
10
/* this is a comment */ is not a valid C++ comment.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
11
Any text after the \\ delimiter, but only to the end of the current line, is taken to be a comment in C++.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
12
The header files in C++ are different from those in C, but perform the same task and occupy similar positions in a C++ program that they occupy in a C program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
13
C++'s cin does not require the address operator needed for C's scanf() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
14
C++ uses newl to signify a new line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
15
One of the driving forces in the creation of object-oriented languages was the inability of procedurally structured code to be extended easily without extensive revisions, retesting, and reevaluations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
16
Object-oriented languages make it easier to reuse code in a manner that significantly increases software productivity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
17
A data type provides both a set of values and a set of operations that can be applied to these values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
18
A programmer-defined data type is known as an ADT.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
19
In a class, values defined for the data type can only be accessed and operated on by functions specified as part of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
20
Polymorphism permits existing code, which has been thoroughly tested, to be reused efficiently without the need for extensive retesting.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
21
A parent class is also called a derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
22
A derived class is also called a child class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
23
Using polymorphism, existing operations on a base class can be left alone, without the need to retest and reverify them, while they are extended to a derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
24
C++ is a true object-oriented language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
25
In a true object-oriented language all programs would have to adhere to an object-oriented structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
26
Use ____ to include standard input and output header files in a C program.

A)#include
B)using namespace std;
C)#include
D)#include
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
27
Use ____ to include standard input and output header files in a C++ program.

A)#include
B)using namespace std;
C)#include using namespace std;
D)#include
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
28
You can use ____ for standard input in C.

A)scanf()
B)read()
C)cin
D)cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
29
You can use ____ for standard input in C++.

A)sscanf()
B)read()
C)cin
D)cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
30
You can use ____ for standard output t in C.

A)write()
B)printf()
C)cin
D)cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
31
You can use ____ for standard output in C++.

A)write()
B)sprintf()
C)cin
D)cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
32
An example of a use of cin is ____.

A)cin >> price;
B)cin -> price;
C)cin << price;
D)cin < price;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
33
An example of a use of cout is ____.

A)cout >> "Hello World";
B)cout -> "Hello World";
C)cout << "Hello World";
D)cout < "Hello World";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
34
The use of format manipulators in C++ requires the header file ____.

A)iostream
B)iomanip
C)namespace
D)std
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ can be used instead of '\n' in C++.

A)'\0'
B)'\N'
C)newl
D)endl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
36
____ is a C++ format manipulator.

A)iostream
B)endl
C)fixed
D)cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
37
____ is not a comment delimiter in C++.

A)/*
B)*/
C)//
D)\\
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
38
printf("Enter the price: "); can be written in C++ as ____.

A)cout << "Enter the price: ";
B)cout >> "Enter the price: ";
C)cin << "Enter the price: ";
D)cin >> "Enter the price: ";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
39
scanf("%lf", &price); can be written in C++ as ____.

A)cin << &price;
B)cin << price;
C)cin >> &price;
D)cin >> price;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
40
/* this is a comment */ can be written in C++ as ____.

A)\\ this is a comment
B)// this is a comment
C)/ this is a comment /
D)*/ this is a comment /*
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
41
C++'s endl is equivalent to C's newline sequence '\n' followed by a(n) ____ function call.

A)flush()
B)force()
C)print()
D)out()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
42
The three features required for an object-oriented language are class construction, inheritance, and ____.

A)operator overloading
B)polymorphism
C)abstraction
D)encapsulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
43
____ is the ability to create programmer-defined data types.

A)Polymorphism
B)Inheritance
C)Class construction
D)Encapsulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
44
A ____ is a completely new data type that incorporates all of the data values and operations of one class with new data and operations that create a different and expanded class.

A)class instance
B)base class
C)specific class
D)derived class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
45
When using inheritance, the initial class is known as the ____.

A)parent class
B)child class
C)subclass
D)derived class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
46
When using inheritance, the derived class is known as the ____.

A)parent class
B)base class
C)subclass
D)initial class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
47
____ permits the same operation to invoke one set of results on data values of a base class and a different set of results on data values of a derived class.

A)Polymorphism
B)Inheritance
C)Class construction
D)Encapsulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
48
Generic data types are available in C++ through the ____ library.

A)iostream
B)iomanip
C)STD
D)STL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
49
C++ is sometimes known as a(n) ____ language.

A) interpreted
C) virtual
B) hybrid
D) procedural
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 49 في هذه المجموعة.