Simplified guide of MCQs for Exams, Interviews

Topic: Computer Programming

1 .  Which command will be used to print data?

  • A. echo "mcqsbucket.com";
  • B. Echo mcqsbucket.com
  • C. Print "mcqsbucket.com";
  • D. Print_r mcqsbucket.com

Correct Answer:

echo "mcqsbucket.com";


2 .  Which of the following is shared structure of a set of similar objects

  • A. Encapsulation
  • B. A Class
  • C. Inheritance

Correct Answer:

A Class


3 .  Which of the following does not have a body

  • A. An Interface
  • B. A Class
  • C. An Abstract method
  • D. None

Correct Answer:

An Abstract method


4 .  Which of the following is pure objected oriented programming language?

  • A. Java
  • B. SmallTalk
  • C. C++
  • D. Kotlin

Correct Answer:

SmallTalk


5 .  I oops public , private and protected are

  • A. Classes
  • B. Access Modifiers
  • C. Interfaces
  • D. Methods signature

Correct Answer:

Access Modifiers


6 .  A Private member of a class is visible to

  • A. ever where
  • B. in sub class
  • C. member to same package
  • D. only member of same class

Correct Answer:

only member of same class


7 .  Which keyword is used to inherit a class or abstract class is

  • A. extends
  • B. extend
  • C. implement
  • D. inherit

Correct Answer:

extends


8 .  Which of the following is an abstract data type?

  • A. Double
  • B. String
  • C. Int
  • D. Class

Correct Answer:

Class


9 .  Can we overload constructor in derived class?

  • A. Yes
  • B. No

Correct Answer:

No


10 .  Which of the following is not related to OOPs?

  • A. Class and Object
  • B. Constructor and Destructor
  • C. Structure and Union

Correct Answer:

Structure and Union