A. data abstraction.
B. polymorphism.
C. overloading.
D. inheritance.
Polymorphism is the ability of a message or data to be processed in more than one form.
A. object creation.
B. object formation.
C. instantiation.
D. instant object.
An object is an instance of a class. It is the root of class hierarchy and the process of creating it is called instantiation.
A. class.
B. object.
C. group.
D. module.
Object is the root of class hierarchy. It is a discrete entity with some characteristics and behaviour.
A. module.
B. abstraction.
C. polymorphism.
D. data.
A group of functions together form a larger identity called module.
A. partitioning.
B. separating.
C. modularity.
D. expandibilty.
Modularity is an act of partitioning a program into individual components. It reduces the complexity to some degree and creates a number of well defined, documented boundary within the program.
A. programming paradigm.
B. programming procedure.
C. programming function.
D. programming class.
Paradigm refers to a way of doing things. A programming paradigm gives an idea of how problems are generally analyzed and solved in a particular programming language.
A. data abstraction.
B. encapsulation.
C. data hiding.
D. inheritance.
Data hiding is a related concept to data abstraction. It is a characteristic of object oriented programming. All data that is not required by an object can be hidden to make the code easy.
A. information hiding.
B. inheritance.
C. redefinition.
D. overloading.
A type of polymorphism, where different functions with the same name are invoked based on the data types of the parameters passed, is called overloading.
A. polymorphism.
B. inheritance.
C. abstraction.
D. encapsulation.
Inheritance is the capability of one class to inherit the properties of another class. For example-class ‘cars’ inherits the properties from automobiles, which itself inherits from another class 'vehicles'.
A. base class.
B. concrete class.
C. abstract class.
D. super class.
An abstract class is meant to be used as a base class, from which other classes are derived.
A. cross property of inheritance.
B. transitive property of inheritance.
C. derived property of inheritance.
D. reusablity of inheritance.
The transitive nature of inheritance is reflected in multilevel inheritance.
A. data abstraction.
B. encapsulation.
C. modularity.
D. polymorphism.
A person presses the switch according to his need. He does not know what is happening inside, how it is happening, etc. One only knows the essential things to operate on switch board without knowing the background details of switchboard. This is data abstraction.
A. modular programming.
B. object oriented programming.
C. structural programming.
D. procedural programming.
In this way, the data structure becomes an object that includes both data and functions.
A. data abstraction.
B. encapsulation.
C. modularity.
D. polymorphism.
This is data abstraction where we know the essential things to drive a car, without including the background details or explanations.
A. modular programming.
B. procedural programming.
C. object based programming.
D. object-oriented programming.
It is a programming paradigm that uses the concept of objects and classes and implements these features.
A. the best programming method.
B. a programming method that localizes the implementation details.
C. a programming method, which implements OOPS concepts.
D. a programming method, which leads to increased time and cost overheads during design changes.
Procedural programming is susceptible to design changes, which leads to many modifications in the code. This results in increased time and cost overheads at times.
A. Java.
B. C.
C. VB.
D. Small talk.
C++ inherits its base class from C as it was intoduced with the good features of C and to remove its drawbacks.
A. abstraction implements encapsulation.
B. encapsulation implements abstraction.
C. encapsulation and abstraction are opposite.
D. objects as to class.
Encapsulation is a way to implement data abstraction. Abstraction and encapsulation are complimentary concepts. Abstraction focuses upon the observable behaviour of an object, whereas encapsulation focuses upon the implementation that gives rise to this behaviour.
A. middle level language.
B. high level language.
C. C++.
D. assembly language.
Assembly languages have the same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers.
A. implements polymorphism.
B. implements abstraction.
C. implements encapsulation.
D. needs a base class.
Inheritance is the ability of a class (derived) to inherit properties from other class (base).
A. procedures.
B. data and objects.
C. user.
D. information.
Object-oriented programming views a problem in terms of objects involved rather than procedures for doing it.
A. data than the work performed on it.
B. doing things rather than on data itself.
C. how complicated the data is.
D. objects and classes.
Procedural Programming focuses on the processing rather on the data required.
A. information hiding.
B. inheritance.
C. redefinition.
D. overloading.
A type of polymorphism where different functions with the same name are invoked, based on the data types of the parameters passed is called overloading.
A. ignores essential feature of product design.
B. divides a program into parts.
C. groupes together two or more modules.
D. is same as encapsulation.
Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.
A. supplementary.
B. making things complicated.
C. complementary.
D. not related.
Abstraction focuses upon the observable behaviour of an object, whereas, encapsulation focuses upon the implementation that gives rise to this behaviour.
A. data than the work performed on it.
B. doing things rather than on data itself.
C. not organizing principles of a program.
D. procedures, data and theoritical knowledge.
In procedural programming, the focus is on the processing, the algorithm needed to perform the desired computation.
A. blueprint or prototype from which object is created.
B. the objects in the class do not share common properties.
C. car is not a subclass of vehicles.
D. all data may not be available to all classes.
A class is a blueprint representing a group of objects that share common properties and relationships.
A. supplementary concepts.
B. making things complicated.
C. complementary concepts.
D. modular concepts.
Abstraction and encapsulation are complementary concepts : abstraction focuses upon the observable behaviour of an object, whereas encapsulation focuses upon the implementation that gives rise to this behaviour.
A. system design.
B. object.
C. paradigm.
D. encapsulation.
Paradigm is organising principle of a program.
A. super class.
B. derived class.
C. empty class.
D. base class.
A subclass defines only those features that are unique to it, rest it inherits from its base class.
A. data-oriented.
B. module-oriented.
C. machine-oriented.
D. complex.
Low-level languages (i.e., machine language and assembly language) are machine-oriented and require extensive knowledge of computer circuitry.
A. abstraction.
B. inheritance.
C. polymorphism.
D. modularity.
Encapsulation is the way of combining data and its associated functions under single unit.
A. inherits only data members.
B. inherits only data functions.
C. inherits both the data members and the member functions.
D. is also known as a base class.
A derived class is a class that inherits properties from some other class. It has nearly all the properties of base class but the reverse of it is not true.
A. literals.
B. reserved words.
C. separators.
D. punctuators.
Keywords are also called as reserved words that convey special meaning to compiler.
A. header files.
B. library functions.
C. iostream.
D. main().
A header file is a file containing C declarations and macro definitions to be shared between several source files. They supply the definitions and declarations required to invoke system calls and libraries.
A. enclosed in double quotes .
B. enclosed in single quotes.
C. enclosed in brackets.
D. enclosed in parenthesis.
Text enclosed in single quotes is treated as character constant. The type of character constant is int. Its value is the ASCII code for the character.
A. Bjarne Stroustrop.
B. Dennis Ritchie.
C. James Gosling.
D. Bill Gates.
In 1980, Bjarne Stroustrup, from Bell labs, began the development of the C++ language. This enables programmers to write efficient code and provided close access to the machine.
A. setw, setiosflags, setfill, setprecision.
B. cout, cin.
C. 'n'.
D. setw, endl and scope resolution operator.
The manipulators are setw, setiosflags, setfill, setprecision and endl. Manipulators are used to change the formatting parameters on streams, and to insert or extract certain special characters.
A. within square brackets.
B. within angular bracket.
C. within curly braces.
D. no bracket used etc.
Every function in C++ has its code within curly braces. { }
A. constants.
B. varying float numbers.
C. varying integers.
D. string.
Literals are data items, which never change their value during a program run. They are integer constant, character-constant, floating constant and string –literal.
A. literals.
B. reserved words.
C. separators.
D. punctuators.
Keywords are predefined reserved identifiers that have special meanings.
A. the same directives made to header file are not included in other files.
B. change made to header file is automatically reflected in all files that include the header file.
C. same in standard and current directory.
D. the functions present in the header files can be changed.
Header files contain predefined functions along with their prototypes and function body. These functions can be used directly and need not be modified.
A. spacebar.
B. tab.
C. newline.
D. newline, carriage return, horizontal tab, form feed.
White spaces include special characters required to perform certain tasks.
A. do not declare function prototypes.
B. are headings.
C. are declaration of function prototype.
D. can be modified.
The header files contain functions which are already defined along with their prototypes. The function prototypes cannot be modified.
A. read white spaces.
B. read newline.
C. cannot read white spaces.
D. cannot read white spaces and newline.
When we use cin object then in this case we cannot use white spaces or newline charcterss otherwise it neglects the string after white space or newline. For this purpose we use gets()
A. floating point.
B. integer.
C. real constant.
D. string.
A real constant in exponent form consists of two parts: mantissa and exponent.
A. class.
B. class object.
C. class method.
D. header file.
cin is an object of class istream that represents the standard input stream.
A. integer value.
B. any ASCII character.
C. alphabets only.
D. special characters only.
Computers can only understand numbers, so an ASCII code is the numerical representation of a character.
A. a place where data is stored.
B. a data type.
C. data modifier.
D. access specifer.
A variable is a way of referring to a memory location used in a computer program. This memory location holds values- perhaps numbers or text.
A. _abc.
B. age-16.
C. 35students.
D. rule+s.
_abc is a valid identifier.
A. _abc.
B. age16.
C. 35students.
D. rules.
35students is invalid identifier as it starts with number.
A. enter( )
B. output( )
C. start ( )
D. main( )
Execution of a program starts from mian( ) function.
A. terminating the program.
B. flashing an error message.
C. producing a syntax error.
D. describing the error.
A compiler reports an error by flashing an error message. An error message contains a line number and a brief desciption of the error.
A. class.
B. token.
C. module.
D. sub class.
It may used alone or combined with other modules of the same program.
A. unidentifiable entity.
B. module.
C. paradigm.
D. identifiable entity.
Object is an identifiable entity with some characteristics and behaviour.
A. unsafe if encapsulated.
B. safe if encapsulated.
C. unimportant in object oriented programming.
D. least important entity.
The data cannot be accessed directly. Data and its functions are encapsulated into a single entity.
A. base class.
B. class.
C. derived class.
D. any class.
Subclasses (or derived classes), inherit attributes and behavior of the pre-existing classes, which are referred to as base or super class.
A. transitive nature of abstraction.
B. transitive nature of inheritance.
C. transitive nature of encapsulation.
D. transitive nature of polymorphism.
Inheritance is one of the important concepts of object-oriented language because of its transitive nature, i.e., it can be passed on further.
A. polymorphism.
B. inheritance.
C. abstraction.
D. encapsulation.
It is a feature that allows values of different data types to be handled using a uniform interface.
A. modularity.
B. polymorphism.
C. inheritance.
D. atomicity.
Polymorphism is the concept that supports the capability of data and object of a class to behave differently or in more than one form.
A. ability to derive a new class.
B. function overloading.
C. operator overloading.
D. wrapping up of data.
Encapsulation is the process of combining data and functions into a single unit called class.
A. they need extensive knowledge of computer circuitary.
B. they are easy to understand.
C. they are user friendly.
D. they are portable.
A low-level language does not need a compiler or interpreter to run; the processor for which the language was written is able to run the code.
A. programs are written by programmes.
B. written in binary code.
C. they are not complicated.
D. use English like keywords.
High level languages offer English like keywords, constructs for decision and use of variables and constants; making it easier to read.
A. state and behaviour.
B. complexity and state.
C. shape and size.
D. procedure and sequencing.
Objects is an identifiable entity with some characteristics (state) and behaviour.
A. module.
B. abstraction.
C. polymorphism.
D. data.
Modular programming can be used to break up a large program into manageable units or to create code that can be easily re-used.
A. inheritance.
B. encapsulation.
C. abstraction.
D. polymorphism.
Encapsulation is wrapping up of data and operations into a single unit.
A. inheritance.
B. class.
C. polymorphism.
D. abstraction.
Polymorphism is the ability for a message or data to be processed in more than one form.
A. high level language.
B. operating system.
C. super class.
D. type of polymorphism.
A programming language such as Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages.
A. has no concern with the base class.
B. inherits the characteristics of base class.
C. inherit characteristics of sub class.
D. is nothing but the base class itself.
Inheritance is the capability of a class to inherit properties from another class. The class that inherits from other class is derived class.
A. high level language.
B. assembly language.
C. machine language.
D. character language.
It is very easy to program with such languages and they are more portable across platforms.
A. object oriented programming.
B. structured programming.
C. object based programming.
D. programming based on objects and classes.
Structured programming approach was the traditional approach of procedural programming. It has many drawbacks, which were removed by object oriented programming.
A. 0 and 1.
B. only 1.
C. only 0.
D. 1 and 2.
It is the only language the computer can execute directly.
A. always an empty class.
B. a derived class.
C. same as base class.
D. same as super class.
A derived class inherits properties of a base class/super class.
A. has more than a name.
B. has no member functions.
C. is just a name.
D. has no common properties.
The size of an empty class is 1 byte.
A. objects communicate with one another.
B. data and functions are enclosed.
C. data is restricted.
D. data is openly available to all functions in the program.
The programming approach that focuses on the procedures for the solution of a problem is known as procedural programming. This approach emphasizes on the 'doing things' rather than the data.
A. secondary class.
B. derived class.
C. super class.
D. base class.
Derived class inherits properties from super class or base class.
A. is the same as sub class.
B. is also known as a module class.
C. can be subdivided into other derived classes.
D. is unable to divide itself into other derived classes.
A subclass defines only those features that are unique to it, rest it inherits from its base class.
A. module.
B. inheritance.
C. encapsulation.
D. class.
Inheritance is the ability to inherit capability or properties from other object.
A. others are unable to use it.
B. others can use it.
C. it can be used only once.
D. it can be used only twice.
A class acts as a blueprint which once created can be used by other sub classes and objects of that class.
A. seats.
B. brakes.
C. mobility.
D. steering wheel.
A car will characteristics like : steering wheel, seats, a motor, brakes etc. and its behaviour is its mobility.
A. polymorphism.
B. inheritance.
C. abstraction.
D. encapsulation.
Abstraction and encapsulation are complementary concepts : abstraction focuses upon the observable behaviour of an object, whereas encapsulation focuses upon the implementation that gives rise to this behaviour.
A. abstraction.
B. encapsulation.
C. inheritance.
D. data hiding.
It is the process of representing the essential features without including the background details.
A. wrapping up of data and operations.
B. dividing a program into parts.
C. the ability for a data to be processed in more than one form.
D. a way to implement data abstraction.
Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.
A. module.
B. object
C. polymorphism.
D. data abstraction.
Abstraction refers to the act of representing essential features without including the background details or explanation.
A. low level language.
B. high level language.
C. middle level language.
D. scripting language.
C++ includes features of both high level language and low level language. Hence, it is called a middle level language.
A. low level programming.
B. assembly language programming.
C. procedural programming
D. object oriented programming.
In OOP approach, an object is represented by its data and its behaviour is represented by its associated function.
A. objects.
B. modules.
C. classes.
D. procedures.
Modules are a set of related functions that carry specific tasks.
A. data abstraction.
B. data encapsulation.
C. reusability.
D. polymorphism.
A single function name can be used to handle different number and different types of arguments.
A. object oriented programming.
B. object order programming.
C. order object language.
D. object over programming.
OOP is a programming paradigm that uses the concept of objects and classes.
A. high level language
B. low level language
C. middle level language
D. assembly language
C++ provides a set of concepts for the programmer to use and also provides a vehicle for the programmer to specify actions to be executed. Hence, it serves both the aspect of low level and high level language.
A. low level language.
B. high level language.
C. middle level language.
D. scripting language.
Low level languages (machine language and assembly language) are machine oriented and require extensive knowledge of machine circuitry. In machine language, the instructions are given in binary codes whereas in assembly language, instructions are given in symbolic names.
A. they require extensive knowledge of circuitary.
B. they are user friendly.
C. the data gets a back seat.
D. they are bug-free.
In procedural programming, emphasis is on doing things. Data is given second-class status while programming.
A. Fortran and Pascal
B. Assembly and Machine language.
C. Cobol and logo.
D. Basic and C++.
Low-level language provides little or no abstraction from a computer's instruction set architecture.
A. 0.
B. 1.
C. 2.
D. 9.
a was 5 and b was 9, so the expression being evaluated (a>b) was not true. Thus, the first value specified after the question mark was discarded, in favour of the second value (the one after the colon), which was b, with a value of 9.
A. cin.
B. cout.
C. iostream.
D. istream.
cin is a stream used to input the variables in a C++ program. cin is an object of class istream that represents the standard input stream.
&& is having the highest precedence among the following operators.
A. 0.
B. 0.08462.
C. 0.08642.
D. 1.
Both / and * are having the same priority, but they are left to right associative. On checking, / is operated first so the result is 0.
A. // A comment // ;
B. char x=12;
C. struct s { int I; } ;
D. class a Class { public:int x; } ;
In C++, struct s { int I;} ; is a valid declaration of a structure.
A. * .
B. -- .
C. ++ .
D. & .
The ampersand symbol & is used in C++ as a reference declarator in addition to being the address operator.
A. /n.
B. /0.
C. /s.
D. . /!