GATE-Programming Methodology

GATE-Programming Methodology
1. Which of the following are good reasons to use an object oriented language ?
  • you can define you own data types
  • an object oriented program can be taught to correct its own erros
  • It is easier to conceptualize an object
  • both (a) and (c)
Show Answer
2. When a language has the capability to produce new data types, it is called
  • extensible
  • overloaded
  • encapsulated
  • reprehensible
Show Answer
3. Dividing a program into functions
  • is the key object oriented programming
  • Makes the program easier to conceptualize
  • makes the program run faster
  • both (b) and (c)
Show Answer
4. A variable defined within a block is visible
  • throughut the functions
  • from the point of definition onward in the block
  • from the point of definitional onward in the functionq
  • from the point of definition onward in the program
Show Answer
5. In object orient programming classes are useful because they
  • can closely model objects in the real word
  • bring together all aspects of an entity in one place
  • permit data to be hidden from other cloasses
  • all of these
Show Answer
6. Operator overloading is
  • making C++ opertors work with objects
  • giving, new meaning to existing C++ operators
  • making new C++ operators
  • both (a) and (b)
Show Answer
7. Assume a class C with obj1,obj2, and obj3. For the statement ofj3=1 - obj2 to work correctly, the overloaded operator must
  • return a value
  • create a named temporary object
  • use the object of which it is a member as an operand
  • both (a) and (c)
Show Answer
8. Inheritance is a way to
  • pass arguments and improve data hiding
  • pass arguments and add features to existing classes without rewriting them
  • make general classes into more specific classes and add features to existing classes without rewriting them
  • improve data hiding and encapsulation
Show Answer
9. In object oriented programming, advantages of inheritance incldude
  • providing a useful conceptual framework
  • avoiding rewriting of code
  • facilitating class libraries
  • all of these
Show Answer
10. Redirection redirects
  • a file from a device to a stream
  • a stream from a file to the screen
  • a device from the screen to a file
  • the screen from a device to a stream
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test