One of the core strengths of OOP is the ability to create user-defined data types through classes, which allows for better abstraction and encapsulation.
A character constant in C++ must be a single character enclosed in single quotes. All the options provided are strings or invalid formats, not single character constants.
Q.6 The expression a=7/22*(3.14+2)*3/5; is equal to:
C++ is often called semi-object-oriented because it allows programming without classes (procedural style) and does not require every part of the program to be an object, unlike 'pure' OOP languages.
Q.8 When a language has the capability to produce new data types, it is known as?
Modern compilers optimize all basic loop structures (for, while, do-while) into similar machine code, so there is generally no performance difference between them.
Q.10 What is the size of the int data type in C++?
” b=”float (*a)[9]” c=”float*a[9]” d=”None” correct=”b” ans=”The syntax ‘float (*a)[9]’ declares a single pointer that points to an entire array of 9 floating-point numbers.”]
C++ is classified as a high-level language because it provides strong abstraction from the hardware and uses human-readable syntax, though it also offers low-level memory manipulation features.
There are three main types of constructors: Default Constructor (no arguments), Parameterized Constructor (with arguments), and Copy Constructor (initializes an object using another object of the same class).
In C++, a stream is an abstraction that represents a flow of data between a source (like a keyboard or file) and a destination (like a screen or file).
The hash symbol (#) is used to identify pre-processor directives, such as #include or #define, which are processed before the actual compilation begins.
Function overriding allows a derived class to provide a specific implementation of a method already defined in its base class, which is resolved during program execution (Runtime Polymorphism).