CBSE - MCQ Question Banks (के. मा. शि. बो . -प्रश्नमाला )

PreviousNext

Q. 192401 The property by which the same message can be sent to objects of several classes is called


A. data abstraction.

B. polymorphism.

C. overloading.

D. inheritance.

Right Answer is: B

SOLUTION

Polymorphism is the ability of a message or data to be processed in more than one form.


Q. 192402 The process of creating an object is called


A. object creation.

B. object formation.

C. instantiation.

D. instant object.

Right Answer is: C

SOLUTION

An object is an instance of a class. It is the root of class hierarchy and the process of creating it is called instantiation.


Q. 192403 An identifiable entity with some characteristics and behaviour is known as


A. class.

B. object.

C. group.

D. module.

Right Answer is: B

SOLUTION

Object is the root of class hierarchy. It is a discrete entity with some characteristics and behaviour.


Q. 192404 A number of functions grouped and kept as a separate entity is called


A. module.

B. abstraction.

C. polymorphism.

D. data.

Right Answer is: A

SOLUTION

A group of functions together form a larger identity called module.


Q. 192405 The act of partitioning a program into individual components is called


A. partitioning.

B. separating.

C. modularity.

D. expandibilty.

Right Answer is: C

SOLUTION

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.


Q. 192406 The methodology of designing and implementing programs using the key features and building blocks of a programming language is called


A. programming paradigm.

B. programming procedure.

C. programming function.

D. programming class.

Right Answer is: A

SOLUTION

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.


Q. 192407 The concept in which the unessential features or background details are hidden from the world is known as


A. data abstraction.

B. encapsulation.

C. data hiding.

D. inheritance.

Right Answer is: C

SOLUTION

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.


Q. 192408 The ability to reuse objects already defined, perhaps for a different purpose, with modification appropriate to the new purpose, is referred to as


A. information hiding.

B. inheritance.

C. redefinition.

D. overloading.

Right Answer is: D

SOLUTION

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.


Q. 192409 The property of an object-oriented language that lets us generate a model which is closer to the real world model is


A. polymorphism.

B. inheritance.

C. abstraction.

D. encapsulation.

Right Answer is: B

SOLUTION

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'.


Q. 192410 The class which defines an interface but does not necessarily provide implementations for all its member functions, is called as


A. base class.

B. concrete class.

C. abstract class.

D. super class.

Right Answer is: C

SOLUTION

An abstract class is meant to be used as a base class, from which other classes are derived.


Q. 192411 If a class A inherits properties of base class B, then all its subclasses inherit the properties of base class
A. This property is called


A. cross property of inheritance.

B. transitive property of inheritance.

C. derived property of inheritance.

D. reusablity of inheritance.

Right Answer is: B

SOLUTION

The transitive nature of inheritance is reflected in multilevel inheritance.


Q. 192412 In a switch board, one presses certain switches according to one’s requirement without knowing the details of switchboard. This is an example of


A. data abstraction.

B. encapsulation.

C. modularity.

D. polymorphism.

Right Answer is: A

SOLUTION

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.


Q. 192413 A type of programming in which the programmer defines the data types of a data structure and associated operations on data structure is called


A. modular programming.

B. object oriented programming.

C. structural programming.

D. procedural programming.

Right Answer is: B

SOLUTION

In this way, the data structure becomes an object that includes both data and functions.


Q. 192414 When we drive a car, we know gear handling, steering handling, use of clutch and accelerator but do not know the details like wiring, motor working, etc. This is an example of


A. data abstraction.

B. encapsulation.

C. modularity.

D. polymorphism.

Right Answer is: A

SOLUTION

This is data abstraction where we know the essential things to drive a car, without including the background details or explanations.


Q. 192415 The features like information hiding, data abstraction, encapsulation, modularity, polymorphism are implemented in


A. modular programming.

B. procedural programming.

C. object based programming.

D. object-oriented programming.

Right Answer is: D

SOLUTION

It is a programming paradigm that uses the concept of objects and classes and implements these features.


Q. 192416 Procedural programming is


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.

Right Answer is: D

SOLUTION

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.


Q. 192417 C++ inherits its base class from


A. Java.

B. C.

C. VB.

D. Small talk.

Right Answer is: B

SOLUTION

C++ inherits its base class from C as it was intoduced with the good features of C and to remove its drawbacks.


Q. 192418 Encapsulation and abstraction are related as


A. abstraction implements encapsulation.

B. encapsulation implements abstraction.

C. encapsulation and abstraction are opposite.

D. objects as to class.

Right Answer is: B

SOLUTION

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.


Q. 192419 Read, Add, Store operators are used in


A. middle level language.

B. high level language.

C. C++.

D. assembly language.

Right Answer is: D

SOLUTION

Assembly languages have the same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers.


Q. 192420 Inheritance


A. implements polymorphism.

B. implements abstraction.

C. implements encapsulation.

D. needs a base class.

Right Answer is: D

SOLUTION

Inheritance is the ability of a class (derived) to inherit properties from other class (base).


Q. 192421 Object Oriented programming gives more importance to


A. procedures.

B. data and objects.

C. user.

D. information.

Right Answer is: B

SOLUTION

Object-oriented programming views a problem in terms of objects involved rather than procedures for doing it.


Q. 192422 Procedural language paradigam gives more emphasis on


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.

Right Answer is: B

SOLUTION

Procedural Programming focuses on the processing rather on the data required.


Q. 192423 The ability to reuse objects already defined, perhaps for a different purpose, with modification appropriate to the new purpose, is referred to as


A. information hiding.

B. inheritance.

C. redefinition.

D. overloading.

Right Answer is: D

SOLUTION

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.


Q. 192424 Modularity


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.

Right Answer is: B

SOLUTION

Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.


Q. 192425 Abstraction and encapsulation are


A. supplementary.

B. making things complicated.

C. complementary.

D. not related.

Right Answer is: C

SOLUTION

Abstraction focuses upon the observable behaviour of an object, whereas, encapsulation focuses upon the implementation that gives rise to this behaviour.


Q. 192426 Procedural language paradigam gives more emphasis on


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.

Right Answer is: B

SOLUTION

In procedural programming, the focus is on the processing, the algorithm needed to perform the desired computation.


Q. 192427 Class is a


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.

Right Answer is: A

SOLUTION

A class is a blueprint representing a group of objects that share common properties and relationships.


Q. 192428 Abstraction and encapsulation are


A. supplementary concepts.

B. making things complicated.

C. complementary concepts.

D. modular concepts.

Right Answer is: C

SOLUTION

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.


Q. 192429 An approach to programming is termed as


A. system design.

B. object.

C. paradigm.

D. encapsulation.

Right Answer is: C

SOLUTION

Paradigm is organising principle of a program.


Q. 192430 Sub class is a/an


A. super class.

B. derived class.

C. empty class.

D. base class.

Right Answer is: B

SOLUTION

A subclass defines only those features that are unique to it, rest it inherits from its base class.


Q. 192431 Low-level languages are


A. data-oriented.

B. module-oriented.

C. machine-oriented.

D. complex.

Right Answer is: C

SOLUTION

Low-level languages (i.e., machine language and assembly language) are machine-oriented and require extensive knowledge of computer circuitry.


Q. 192432 Encapsulation implements 


A. abstraction.

B. inheritance.

C. polymorphism.

D. modularity.

Right Answer is: A

SOLUTION

Encapsulation is the way of combining data and its associated functions under single unit.


Q. 192433 A derived class


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.

Right Answer is: C

SOLUTION

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.


Q. 192434 Keywords are also called as


A. literals.

B. reserved words.

C. separators.

D. punctuators.

Right Answer is: B

SOLUTION

Keywords are also called as reserved words that convey special meaning to compiler.


Q. 192435 In our human body, we have brain, that stores all the functions to be performed by our body. For C++ these functions are stored in


A. header files.

B. library functions.

C. iostream.

D. main().

Right Answer is: A

SOLUTION

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.


Q. 192436 A character constant is


A. enclosed in double quotes .

B. enclosed in single quotes.

C. enclosed in brackets.

D. enclosed in parenthesis.

Right Answer is: B

SOLUTION

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.


Q. 192437 C++ was developed by


A. Bjarne Stroustrop.

B. Dennis Ritchie.

C. James Gosling.

D. Bill Gates.

Right Answer is: A

SOLUTION

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.


Q. 192438 Manipulators used in C++ are


A. setw, setiosflags, setfill, setprecision.

B. cout, cin.

C. 'n'.

D. setw, endl and scope resolution operator.

Right Answer is: A

SOLUTION

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.


Q. 192439 Every function in c++ has its code


A. within square brackets.

B. within angular bracket.

C. within curly braces.

D. no bracket used etc.

Right Answer is: C

SOLUTION

Every function in C++ has its code within curly braces. { }


Q. 192440 During a program run, literals are


A. constants.

B. varying float numbers.

C. varying integers.

D. string.

Right Answer is: A

SOLUTION

Literals are data items, which never change their value during a program run. They are integer constant, character-constant, floating constant and string –literal.


Q. 192441 Keywords are also called as


A. literals.

B. reserved words.

C. separators.

D. punctuators.

Right Answer is: B

SOLUTION

Keywords are predefined reserved identifiers that have special meanings.


Q. 192442 The predefined safeguard by the header file is


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.

Right Answer is: B

SOLUTION

Header files contain predefined functions along with their prototypes and function body. These functions can be used directly and need not be modified.


Q. 192443 white spaces include


A. spacebar.

B. tab.

C. newline.

D. newline, carriage return, horizontal tab, form feed.

Right Answer is: D

SOLUTION

White spaces include special characters required to perform certain tasks.


Q. 192444 The header files


A. do not declare function prototypes.

B. are headings.

C. are declaration of function prototype.

D. can be modified.

Right Answer is: C

SOLUTION

The header files contain functions which are already defined along with their prototypes. The function prototypes cannot be modified.


Q. 192445 cin>> can


A. read white spaces.

B. read newline.

C. cannot read white spaces.

D. cannot read white spaces and newline.

Right Answer is: D

SOLUTION

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()


Q. 192446 The data type of the following number 563E05 is


A. floating point.

B. integer.

C. real constant.

D. string.

Right Answer is: C

SOLUTION

A real constant in exponent form consists of two parts: mantissa and exponent.


Q. 192447 cin is a


A. class.

B. class object.

C. class method.

D. header file.

Right Answer is: B

SOLUTION

cin is an object of class istream that represents the standard input stream.


Q. 192448 char stores


A. integer value.

B. any ASCII character.

C. alphabets only.

D. special characters only.

Right Answer is: B

SOLUTION

Computers can only understand numbers, so an ASCII code is the numerical representation of a character.


Q. 192449 Variable is


A. a place where data is stored.

B. a data type.

C. data modifier.

D. access specifer.

Right Answer is: A

SOLUTION

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.


Q. 192450 The valid identifier is


A. _abc.

B. age-16.

C. 35students.

D. rule+s.

Right Answer is: A

SOLUTION

_abc is a valid identifier.


Q. 192451 State the invalid identifier


A. _abc.

B. age16.

C. 35students.

D. rules.  

Right Answer is: C

SOLUTION

35students is invalid identifier as it starts with number.


Q. 192452 Programs always begin with function


A. enter( )

B. output( )

C. start ( )

D. main( )

Right Answer is: D

SOLUTION

Execution of a program starts from mian( ) function.


Q. 192453 A compiler reports an error by


A. terminating the program.

B. flashing an error message.

C. producing a syntax error.

D. describing the error.

Right Answer is: B

SOLUTION

A compiler reports an error by flashing an error message. An error message contains a line number and a brief desciption of the error.


Q. 192454 A portion of a program that carries out a specific function is called a


A. class.

B. token.

C. module.

D. sub class.

Right Answer is: C

SOLUTION

It may used alone or combined with other modules of the same program.


Q. 192455 An object is a/an


A. unidentifiable entity.

B. module.

C. paradigm.

D. identifiable entity.

Right Answer is: D

SOLUTION

Object is an identifiable entity with some characteristics and behaviour.


Q. 192456 Data is considered


A. unsafe if encapsulated.

B. safe if encapsulated.

C. unimportant in object oriented programming.

D. least important entity.

Right Answer is: B

SOLUTION

The data cannot be accessed directly. Data and its functions are encapsulated into a single entity.


Q. 192457 Properties are inherited by


A. base class.

B. class.

C. derived class.

D. any class.

Right Answer is: C

SOLUTION

Subclasses (or derived classes), inherit attributes and behavior of the pre-existing classes, which are referred to as base or super class.


Q. 192458 “A class inherits properties of its base class and then by all its sub classes” . The statement points towards


A. transitive nature of abstraction.

B. transitive nature of inheritance.

C. transitive nature of encapsulation.

D. transitive nature of polymorphism.

Right Answer is: B

SOLUTION

Inheritance is one of the important concepts of object-oriented language because of its transitive nature, i.e., it can be passed on further.


Q. 192459 The ability of a message or data to be processed in more than one form is


A. polymorphism.

B. inheritance.

C. abstraction.

D. encapsulation.

Right Answer is: A

SOLUTION

It is a feature that allows values of different data types to be handled using a uniform interface.


Q. 192460 Ability of data to be processed in more than one form is


A. modularity.

B. polymorphism.

C. inheritance.

D. atomicity.

Right Answer is: B

SOLUTION

Polymorphism is the concept that supports the capability of data and object of a class to behave differently or in more than one form.


Q. 192461 Encapsulation refers to


A. ability to derive a new class.

B. function overloading.

C. operator overloading.

D. wrapping up of data.

Right Answer is: D

SOLUTION

Encapsulation is the process of combining data and functions into a single unit called class.


Q. 192462 Low level languages are close to machine level language as


A. they need extensive knowledge of computer circuitary.

B. they are easy to understand.

C. they are user friendly.

D. they are portable.

Right Answer is: A

SOLUTION

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.


Q. 192463 High level languages are close to programmer as


A. programs are written by programmes.

B. written in binary code.

C. they are not complicated.

D. use English like keywords.

Right Answer is: D

SOLUTION

High level languages offer English like keywords, constructs for decision and use of variables and constants; making it easier to read.


Q. 192464 All real world object examples have 2 characterstics


A. state and behaviour.

B. complexity and state.

C. shape and size.

D. procedure and sequencing.

Right Answer is: A

SOLUTION

Objects is an identifiable entity with some characteristics (state) and behaviour.


Q. 192465 A number of functions can be grouped and kept as a separate entity called


A. module.

B. abstraction.

C. polymorphism.

D. data.

Right Answer is: A

SOLUTION

Modular programming can be used to break up a large program into manageable units or to create code that can be easily re-used.


Q. 192466 Putting together all information, attributes, properties and function in one object is called


A. inheritance.

B. encapsulation.

C. abstraction.

D. polymorphism.

Right Answer is: B

SOLUTION

Encapsulation is wrapping up of data and operations into a single unit.


Q. 192467 The concept that supports the capability of an object of a class to behave differently in response to a message or action is


A. inheritance.

B. class.

C. polymorphism.

D. abstraction.

Right Answer is: C

SOLUTION

Polymorphism is the ability for a message or data to be processed in more than one form.


Q. 192468 Pascal is a/an


A. high level language.

B. operating system.

C. super class.

D. type of polymorphism.

Right Answer is: A

SOLUTION

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.


Q. 192469 A derived class


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.

Right Answer is: B

SOLUTION

Inheritance is the capability of a class to inherit properties from another class. The class that inherits from other class is derived class.


Q. 192470 The language which uses natural language elements, constructs for sequence and uses variables and constants is


A. high level language.

B. assembly language.

C. machine language.

D. character language.

Right Answer is: A

SOLUTION

It is very easy to program with such languages and they are more portable across platforms.


Q. 192471 The programming approach which failed to show the desired results in terms of bug-free, easy-to-maintain, and reusable programs is


A. object oriented programming.

B. structured programming.

C. object based programming.

D. programming based on objects and classes.

Right Answer is: B

SOLUTION

Structured programming approach was the traditional approach of procedural programming. It has many drawbacks, which were removed by object oriented programming.


Q. 192472 Instructions are written in binary code using


A. 0 and 1.

B. only 1.

C. only 0.

D. 1 and 2.

Right Answer is: A

SOLUTION

It is the only language the computer can execute directly.


Q. 192473 Subclass is


A. always an empty class.

B. a derived class.

C. same as base class.

D. same as super class.

Right Answer is: B

SOLUTION

A derived class inherits properties of a base class/super class.


Q. 192474 An empty class


A. has more than a name.

B. has no member functions.

C. is just a name.

D. has no common properties.

Right Answer is: C

SOLUTION

The size of an empty class is 1 byte.


Q. 192475 In procedural paradigm,


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.

Right Answer is: D

SOLUTION

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.


Q. 192476 The new class created from an existing class is called


A. secondary class.

B. derived class.

C. super class.

D. base class.

Right Answer is: B

SOLUTION

Derived class inherits properties from super class or base class.


Q. 192477 A 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.

Right Answer is: C

SOLUTION

A subclass defines only those features that are unique to it, rest it inherits from its base class.


Q. 192478 Taking an existing object and adding new capabilities to it in order to get a new object is called


A. module.

B. inheritance.

C. encapsulation.

D. class.

Right Answer is: B

SOLUTION

Inheritance is the ability to inherit capability or properties from other object.


Q. 192479 Once a class has been created and tested


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.

Right Answer is: B

SOLUTION

A class acts as a blueprint which once created can be used by other sub classes and objects of that class.


Q. 192480 If 'car' is an object, it's behaviour is its


A. seats.

B. brakes.

C. mobility.

D. steering wheel.

Right Answer is: C

SOLUTION

A car will characteristics like : steering wheel, seats, a motor, brakes etc. and its behaviour is its mobility.


Q. 192481 The art of presenting the most important features of an object without exposing its background details is called


A. polymorphism.

B. inheritance.

C. abstraction.

D. encapsulation.

Right Answer is: C

SOLUTION

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.


Q. 192482 The mechanism which reduces and factors out details so that one can focus on essential concepts is


A. abstraction.

B. encapsulation.

C. inheritance.

D. data hiding.

Right Answer is: A

SOLUTION

It is the process of representing the essential features without including the background details.


Q. 192483 Modularity is


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.

Right Answer is: B

SOLUTION

Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.


Q. 192484 Act of representing essential features without including background details is


A. module.

B. object

C. polymorphism.

D. data abstraction.

Right Answer is: D

SOLUTION

Abstraction refers to the act of representing essential features without including the background details or explanation.


Q. 192485 C++ is an example of


A. low level language.

B. high level language.

C. middle level language.

D. scripting language.

Right Answer is: C

SOLUTION

C++ includes features of both high level language and low level language. Hence, it is called a middle level language.


Q. 192486 The advantage of bundling code into objects is a characteristic of


A. low level programming.

B. assembly language programming.

C. procedural programming

D. object oriented programming.

Right Answer is: D

SOLUTION

In OOP approach, an object is represented by its data and its behaviour is represented by its associated function.


Q. 192487 A larger program broken down into smaller units or functions is called


A. objects.

B. modules.

C. classes.

D. procedures.

Right Answer is: B

SOLUTION

Modules are a set of related functions that carry specific tasks.


Q. 192488 Function overloading implements


A. data abstraction.

B. data encapsulation.

C. reusability.

D. polymorphism.

Right Answer is: D

SOLUTION

A single function name can be used to handle different number and different types of arguments.


Q. 192489 OOP stands for


A. object oriented programming.

B. object order programming.

C. order object language.

D. object over programming.

Right Answer is: A

SOLUTION

OOP is a programming paradigm that uses the concept of objects and classes.


Q. 192490 C++ is a


A. high level language

B. low level language

C. middle level language

D. assembly language

Right Answer is: C

SOLUTION

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.


Q. 192491 The language close to the hardware is


A. low level language.

B. high level language.

C. middle level language.

D. scripting language.

Right Answer is: A

SOLUTION

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.


Q. 192492 Shortcoming of procedural languages are that


A. they require extensive knowledge of circuitary.

B. they are user friendly.

C. the data gets a back seat.

D. they are bug-free.

Right Answer is: C

SOLUTION

In procedural programming, emphasis is on doing things. Data is given second-class status while programming.


Q. 192493 The two low-level languages are


A. Fortran and Pascal

B. Assembly and Machine language.

C. Cobol and logo.

D. Basic and C++.

Right Answer is: B

SOLUTION

Low-level language provides little or no abstraction from a computer's instruction set architecture.


Q. 192494 The output of the code is# include < iostream.h >
using namespace std;
int main ()
{
int a,b,c;
a=5;
b=9;
c = (a>b) ? a : b;
cout << c;
return 0;
}


A. 0.

B. 1.

C. 2.

D. 9.

Right Answer is: D

SOLUTION

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.


Q. 192495 Values can be input to variables in the program, using the stream


A. cin.

B. cout.

C. iostream.

D. istream.

Right Answer is: A

SOLUTION

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.


Q. 192496
Right Answer is: C

SOLUTION

&& is having the highest precedence among the following operators.


Q. 192497 In C and C++, if I is an integer then, I=7/9*9 evaluates to


A. 0.

B. 0.08462.

C. 0.08642.

D. 1.

Right Answer is: A

SOLUTION

Both / and * are having the same priority, but they are left to right associative. On checking, / is operated first so the result is 0.


Q. 192498 The statement valid in C++ is


A. // A comment // ;

B. char x=12;

C. struct s { int I; } ;

D. class a Class { public:int x; } ;

Right Answer is: C

SOLUTION

In C++, struct s { int I;} ; is a valid declaration of a structure.


Q. 192499 The address operator is denoted as


A. * .

B. -- .

C. ++ .

D. & .

Right Answer is: D

SOLUTION

The ampersand symbol & is used in C++ as a reference declarator in addition to being the address operator.


Q. 192500 The character that terminates all character array strings is


A. /n.

B. /0.

C. /s.

D. . /!

Right Answer is: B

SOLUTION

/0 is the null character which marks the end of a string.


PreviousNext