Programming Languages Quiz - CBSE Class 12 ICT
Free practice quiz: Programming Languages (CBSE Class 12 ICT). 11 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 11 questions freeSample questions
Which of the following is NOT a high-level programming language?
- Python
- Java
- Assembly Language
- C++
Show answer
Answer: C. Assembly Language
Assembly language is a low-level programming language, closer to machine code than high-level languages like Python, Java, and C++.
Explain the difference between compilation and interpretation.
- Compilation translates source code to machine code; interpretation executes source code line by line.
- Compilation executes source code line by line; interpretation translates source code to machine code.
- Both are the same.
- Compilation is faster; interpretation is slower.
Show answer
Answer: A. Compilation translates source code to machine code; interpretation executes source code line by line.
Compilation translates the entire source code into machine code before execution, while interpretation executes the code line by line without prior translation.
What is an interpreter?
- A program that translates source code into machine code.
- A program that executes source code line by line.
- A program that debugs source code.
- A program that writes source code.
Show answer
Answer: B. A program that executes source code line by line.
An interpreter executes source code line by line, without first translating it entirely into machine code.
What are the four fundamental principles of OOP?
- Abstraction, Encapsulation, Inheritance, Polymorphism
- Compilation, Interpretation, Debugging, Testing
- Variables, Data Types, Operators, Functions
- Input, Process, Output, Storage
Show answer
Answer: A. Abstraction, Encapsulation, Inheritance, Polymorphism
Abstraction, Encapsulation, Inheritance, and Polymorphism are the four main principles of Object-Oriented Programming.
What is polymorphism in OOP?
- The ability of an object to take on many forms.
- The ability to hide data within a class.
- The ability to create new classes from existing classes.
- The ability to define the behavior of an object.
Show answer
Answer: A. The ability of an object to take on many forms.
Polymorphism allows objects of different classes to respond to the same method call in their own specific way.