Which of the following is an object oriented programming language?
Object oriented programming languages introduction and examples MCQs
1. MCQ: Which of the following is an object oriented programming language?
A. c
B. c++
C. ml
D. ada
Answer: C++
2. In object oriented programming, the objects can contain ______ ?
A. data
B. code
C. variables
D. all of these
Answer: all of these
3. In object oriented programming, the objects store data in the form of____?
A. fields
B. methods
C. procedures
D. both b and c
Answer: fields
4. Which one of the following is a more generalized concept?
A. Object
B. Class
C. Attributes
D. Functions
Answer: Class
5. Which statement is true about objects in object oriented programming?
(a). procedures are attached to objects but can’t access and modify the object’s data fields
(b). procedures are not attached to objects and so can’t access and modify the object’s data fields
(c). procedures are attached to objects and can access but can’t modify the object’s data fields
(d). procedures are attached to objects and can access and modify the object’s data fields
Answer: procedures are attached to objects and can access and modify the object’s data fields
6. In object oriented programming, the objects store code in the form of____?
A. fields
B. methods
C. procedures
D. both b and c
Answer: both b and c
7. Which of the following is not an object oriented programming language?
A. C
B. C++
C. ml
D. both a and c
Answer: both a and c
8. Which of the following statement is correct about classes in object oriented programming?
A. Classes can share attribute with each other
B. Classes can’t share attribute with each other
C. Classes represents recursion
D. None of these
Answer: Classes can share attribute with each other
9. Which one of the following statement is correct about objects and classes?
(a). objects are not instances of classes
(b). objects are instances of classes
(c). classes are instances of objects
(d). objects are instances of classes
Answer: objects are instances of classes
Examples of Object oriented programming languages
- Fortran 2003
- Lasso
- Modula-3
- Nim
- Graphtalk
- JADE
- FPr
- Lava
- Oberon
- Lingo
- Gura (programming language)
- D
- Genie
- Chapel
- Curl
- F-Script
- J
- BETA
- Clarion
- F#
- MATLAB
- Go
- Object Pascal
- C#
- COOL
- Logtalk
- COBOL
- Kotlin
- Common Lisp
- Julia
- Java
- ABAP
- FreeBASIC
- Dart
- AmigaE
- Ada 95
- CLU
- J#
- Dylan
- Lexico
- Elixir
- LISP
- Nemerle
- DataFlex
- Boo
- E
- Gambas
- Ceylon
- Apex
- C++
- Noop
- CorbaScript
- ColdFusion
- Cobra
- IDLscript
- NetRexx
- Eiffel
- Object REXX
- Objective-C
- OCaml
- Omnis Studio
- OpenEdge Advanced Business Language
- Oz, Mozart Programming System
- Perl since v5
- PHP since v4, greatly enhanced in v5
- Power Builder
- Prototype-based languages
- Python
- REALbasic
- Ruby
- Rust
- Scala
- Scriptol
- Seed7
- SenseTalk
- Simula
- Smalltalk
- Squirrel
- Swift
- TADS
- Tcl
- Transcript
- TypeScript
- Ubercode
- Vala
- Visual Basic
- Visual FoxPro
- Visual Prolog
- XBase++
- Xojo
- ZZT-ooP
Example of a program with object oriented programming
Write a program to add two numbers with OOP concepts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include<iostream> using namespace std; class addition { protected : int First number; int Secondnumber; }; class child : public addition { public: int addition() { cout<<"enter First number?"<<endl; cin>>First number; cout<<"enter Secondnumber?"<<endl; cin>>Secondnumber; cout<<"addition="<<First number+Secondnumber<<endl; } }; int main() { child t4tutorials_object; t4tutorials_object.addition(); } |
OOP MCQs
- OOP intro & examples MCQs
- Classes and Inheritance MCQs
- Friend Function MCQs
- Virtual Function MCQs
- Polymorphism MCQs
- Polymorphism MCQs 2
- Operator overloading MCQs
- Object Oriented Programming MCQs – Very Important
Programming C Plus Plus MCQs
- Low-level and high-level languages MCQs
- Procedural and non Procedural languages MCQs
- C++ STANDARD LIBRARY MCQs
- Array MCQs
- Arrays MCQs 2
- Pointers Solved MCQs
- Inline Function MCQs – C++
- Top 50 Programming C++ MCQs
- MCQs of introduction to programming
- Past Papers 2022 C++ MCQs
- Past Papers 2021 C++ MCQs
- Past Papers 2020 C++ MCQs
- Past Papers 2019 C++ MCQs
- Highly Recommended C++ Important MCQs with Explanation
- OOP
- OOP intro & examples MCQs
- Classes and Inheritance MCQs
- Friend Function MCQs
- Virtual Function MCQs
- Polymorphism MCQs
- Polymorphism MCQs 2