Computer Knowledge
Programming Languages and Compilers
2,284 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
-
POST
-
Set accessor
-
Get accessorn
-
Static modifier
-
Internal
B
Correct answer
Explanation
This resembles a method whose return type is void.
-
Continue statement
-
Return statement
-
Break statement
-
PreparedStatement
-
ProtectedData
A
Correct answer
Explanation
This statement passes control to the next iteration of the enclosing iteration statement in which it appears.
-
Arithmetic Exception
-
Array Store Exception
-
Float
-
Math
-
sequencing
-
alteration
-
iteration
-
all of the above
D
Correct answer
Explanation
Structured programming is built on three fundamental control structures: sequence, selection (often called alteration), and iteration (loops).
-
reproductive
-
encapsulated
-
extensible
-
none of above
-
Control words
-
Reserved words
-
Control structures
-
Reserved keys
-
None of these
B
Correct answer
Explanation
Reserved words (or keywords) are words in a programming language that have a predefined meaning and cannot be used as identifiers (like variable or function names) by the programmer.
-
Machine Language
-
BASIC
-
Any high level programming language
-
Specific programming language
-
None of these
A
Correct answer
Explanation
Computers operate at the hardware level using binary signals, which are represented by machine language. All other languages must be translated into machine language for the CPU to execute them.
-
COBOL
-
CORAL
-
C
-
FORTRAN
-
None of these
-
binary language
-
low-level language
-
high-level language
-
machine language
-
None of these
B
Correct answer
Explanation
Assembly level is a low-level language.
-
Interpreter
-
Application program
-
Compiler
-
Assembler
-
None of these
C
Correct answer
Explanation
A compiler is a program that translates source code written in a high-level language into machine-readable object code. An interpreter executes code line-by-line without creating a separate object file.
-
machine code.
-
instruction code.
-
opcode.
-
All of the above
-
None of these
C
Correct answer
Explanation
An opcode (operation code) is the portion of a machine language instruction that specifies the operation to be performed by the CPU.
-
Control worlds
-
Reserved words
-
Control structures
-
Reserved keys
-
None of these
B
Correct answer
Explanation
Reserved words are terms that programming languages set aside for specific purposes and cannot be used as identifiers or variable names. Examples include 'if', 'while', 'class', and 'return'. Control structures and control worlds are not the correct terminology.
-
assembler
-
translator
-
compiler
-
system software
C
Correct answer
Explanation
A compiler translates high-level language source code into machine language code for the entire program at once, unlike an interpreter which does it line by line.
-
Database
-
COM
-
Platform independent
-
Platform dependent
C
Correct answer
Explanation
Java is famous for its 'Write Once, Run Anywhere' capability, which makes it platform-independent.
B
Correct answer
Explanation
LOGO is a programming language designed in the 1960s for educational use, famous for its 'turtle graphics' used to teach programming concepts.