Computer Knowledge
Programming Languages and Compilers
1,170 Questions
Programming languages and compilers involve the rules, syntax, and semantics used to write and execute software programs. Key areas include scripting languages, object oriented concepts, and parsing algorithms like top down parsers. Practice these computer science questions to build proficiency for technical and computer knowledge exams.
Object oriented languagesScripting languagesCompilers and parsersProgramming syntax
Programming Languages and Compilers Questions
-
it does not have structures
-
it does not have pointers
-
it has clean code
-
it is object oriented
-
it is a simple language
B
Correct answer
Explanation
Absence of pointers makes a language clean.
-
1st generation
-
2nd generation
-
3rd generation
-
4th generation
-
5th generation
B
Correct answer
Explanation
Assembly language belongs to 2nd generation.
-
Identification
-
Environment
-
Function
-
Data
-
Procedure
C
Correct answer
Explanation
This is not a valid division of COBOL.
-
Ada
-
Smalltalk
-
Java
-
Object Pascal
A
Correct answer
Explanation
Ada (in its original versions) was not designed as an object-oriented programming language. It was primarily a structured, imperative language with strong typing. Smalltalk, Java, and Object Pascal all support object-oriented programming. Note: Ada 95 later added OOP features, but the original language did not have them.
-
codes
-
mnemonics
-
assembler
-
compiler
-
None of these
B
Correct answer
Explanation
In assembly language, a mnemonic is a symbol which is entered in the operation code of each assembler program.
-
compiler
-
assembler
-
interpreter
-
language processor
-
None of these
D
Correct answer
Explanation
Language processor is the correct answer. All compiler, assembler and interpreter fall under this category.
-
assembly language
-
source language
-
high-level language
-
object language
-
None of these
B
Correct answer
Explanation
The language used in source program and from which translation is to be done
-
computer program
-
algorithm
-
flowchart
-
utility programs
-
None of these
A
Correct answer
Explanation
It is a sequence of coded instructions written to perform a specified task.
-
compiler
-
debugger
-
interpreter
-
assembler
C
Correct answer
Explanation
Option 3 is the correct answer.
-
Procedural languages
-
Non-Procedural languages
B
Correct answer
Explanation
Fourth Generation Languages (4GLs) are non-procedural - users specify WHAT to do, not HOW. Examples include SQL, query languages, and report generators. Earlier generations (3GL like C, Java) require procedural programming details.
A
Correct answer
Explanation
Low-level languages like assembly and machine code are designed for specific processor architectures. They directly reference hardware-specific registers, instructions, and memory addressing modes. Code written for x86 processors won't work on ARM processors without modification, demonstrating machine dependence. High-level languages provide abstraction and portability across platforms.
-
procedural
-
object oriented
-
web development
-
event driven
B
Correct answer
Explanation
Java is fundamentally an object-oriented programming language. It supports core OOP principles like encapsulation, inheritance, and polymorphism through classes and objects. While Java can incorporate procedural and event-driven elements, its primary paradigm is object-oriented.
-
Java. lang
-
Java. io
-
Java. awt
-
Java. applet
A
Correct answer
Explanation
The java.lang package is automatically imported into every Java program without requiring an explicit import statement. It contains fundamental classes like Object, String, Math, and System that are essential for basic Java operations. Packages like java.io, java.awt, and java.applet require explicit imports.
-
Compiler
-
Interpreter
-
Assembler
-
Comparator
C
Correct answer
Explanation
An assembler converts assembly language (mnemonic instructions like MOV, ADD) to machine language (binary code the CPU executes). Compilers translate high-level languages to machine code, interpreters execute high-level code directly, and comparators compare data files. The assembler specifically handles assembly-to-machine translation.