Programming Language MCQ

Programming Language MCQ

Programming Language MCQ, Multiple Choice Questions on Programming Language, C language MCQ, C++ language MCQ, Engineering MCQ, Basic Computer Engineering MCQ

Operating System MCQ

Multiple-Choice Questions

Q.1. Which of the following is said to be a first-generation language?

  • Machine
  • Symbolic
  • High-level
  • Assembly

Answer:  Machine

Q.2. C, C++ and Java are the examples of

  • first generation language 
  • second generation language 
  • third generation language 
  • fourth generation language  

Answer: third generation language

Q.3. Which of the following is a declarative paradigm language?

  • LISP
  • Prolog
  • FORTRAN
  • .NET

Answer: Prolog

Q.4. The computer hardware can understand

  • machine language only 
  • assembly language only  
  • high level language only  
  • both machine and assembly language   

Answer: machine language only

Q.5. C++ is a

  • procedural language 
  • functional language 
  • declarative language  
  • object-oriented language     

Answer: object-oriented language

Q.6. Which of the following is a procedure-oriented language?

  • Pascal
  • Java
  • C++
  • LISP

Answer: Pascal

Q.7. The hierarchical tree-like structure is used in

  • top-down design 
  • bottom-up design 
  • modular design  
  • all the above   

Answer: top-down design

Q.8. A good algorithm must possess which of the following property?

  • There must be some values which are externally supplied.
  • Each step must be clear and unambiguous.
  • The algorithm must terminate after a finite number of steps.
  • All of the above.

Answer: All of the above.

Q.9. The complexity of an algorithm depends on   

  • Space  
  • Time  
  • programming language 
  • all of the above   

Answer: all of the above

Q.10. Encapsulation is used to

  • hide the information 
  • data abstraction 
  • define all necessary features of the real-world objects  
  • all of the above   

Answer: all of the above

Q.11. Which of the following property distinguishes one object from the others?

  • Behavior
  • Identity
  • State
  • Message

Answer: State

Q.12. Class is a collection of

  • similar objects 
  • similar function  
  • dissimilar objects  
  • dissimilar functions 

Answer: similar objects

Q.13. Which of the following have state and behavior?

  • Class
  • Object
  • Function
  • Base class

Answer: Object

Q.14. Which of the following supports the capability of one class to use properties of another class?

  • Class
  • Inheritance
  • Polymorphism
  • Encapsulation

Answer: Inheritance

Q.15. Which of the following supports the capability of sending same messages to objects of several different classes?

  • Class
  • Inheritance
  • Polymorphism
  • Encapsulation

Answer: Polymorphism

Q.16. Which of the following language makes the software reuse possible?

  • Object-oriented programming
  • Object-based programming
  • Procedure-oriented programming
  • Structure-oriented programming

Answer: Object-oriented programming

Q.17. Which of the following is true?

  • Class is an object.
  • Object is a class.
  • Modular programming is procedure-oriented programming.
  • A base class can inherit the properties of a derived class.

Answer: Modular programming is procedure-oriented programming.

Q.18. Which of the following features is used to implement data abstraction?

  • Object
  • Encapsulation
  • Inheritance
  • Polymorphism

Answer: Encapsulation

Q.19. A class

  • is a user defined data type   
  • is a metadata 
  • is a technique to implement encapsulation 
  • all of the above  

Answer: all of the above

Q.20. Object-oriented programming approach focuses on

  • function  
  • data  
  • both 
  • none of the above 

Answer: data 

Q.21. Procedure-oriented programming approach focuses on

  • function 
  • data 
  • both  
  • none of the above  

Answer: function

Q.22. An int data type requires

  • 2 bytes  
  • 4 bytes   
  • 1 bytes 
  • 8 bytes 

Answer: 2 bytes

Q.23. The operator << is called

  • insertion operator  
  • extraction operator 
  • object 
  • function  

Answer: extraction operator

Q.24. C++ was originally developed by

  • Donald Knuth 
  • Bjarne Stroustrup 
  • Ken Thompson 
  • Denis Richie  

Answer: Bjarne Stroustrup

Q.25. If the function does not return any value then its return type is

  • Int.
  • float.
  • void.
  • char.

Answer: void.

Q.26. An array is a collection of

  • integer data items 
  • similar data items 
  • dissimilar data items 
  • built-in data types 

Answer: similar data items

Q.27. Which operator is used to access the structure elements?

  • >>
  • << 
  • . (dot)   
  • *

Answer:  . (dot)

Q.28. Pointer is a

  • variable that can hold the address of any constant  
  • constant 
  • structure 
  • variable that can hold the address of any variable 

Answer: variable that can hold the address of any variable

Leave a Reply

Your email address will not be published. Required fields are marked *