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
-
The target machine on which it is being executed.
-
The target machine other than the machine on which it is being executed.
-
By default, the target is server machine of the node on which it is being executed.
-
Cross compiler does not generate machine code.
-
Both 2 and 3
B
Correct answer
Explanation
Cross compiler generates code for some other target machine defined by user. It can be some other processor or microcontrller or micro processors etc.
-
Lexical
-
Syntax
-
Code generator
-
Boot strap loader
-
Intermediate code generator
B
Correct answer
Explanation
It uses the parse tree to find out syntax validity of the statement.
-
Bottom up
-
Top down
-
Centre break
-
Recursive descent parser
-
None of the above
A
Correct answer
Explanation
Bottom up parsers applies the technique of right most in reverse parsing.
D
Correct answer
Explanation
Java is derived from Oak programming language.
-
Efficient and faster than C
-
Insecurity of data
-
Not robust
-
Object-oriented and interpreted
-
None of these
D
Correct answer
Explanation
Java is objected-oriented and interpreted programing language that is the strong feature of java.
-
Byte
-
Float
-
Character
-
Long double
-
None of these
D
Correct answer
Explanation
It is not a java primitive.
-
High level
-
Low level
-
Middle level
-
Upper level
-
None of these
C
Correct answer
Explanation
The language belongs between high and low level, i.e. C.
-
Serial Template Library
-
Simple Template Library
-
Standard Template Library
-
Single Type Library
-
Static Template Library
C
Correct answer
Explanation
Standard Template Library (STL) is a C++ software library. It is the corect expansion of the term.
-
Compiler
-
Interpreter
-
Editor
-
Emulator
-
Debugger
A
Correct answer
Explanation
A compiler takes your source programming code and converts it into an executable form that the computer can understand.
-
FORTRAN
-
C
-
PROLOG
-
COBOL
-
JAVA
C
Correct answer
Explanation
PROLOG is a general purpose logic programming language associated with artificial intelligence and computational linguistics.
-
Native language
-
Machine language
-
Assembly language
-
High level language
-
Low level language
D
Correct answer
Explanation
High-level languages are used to solve problems and are often described as problem-oriented languages.
-
Java
-
Cable
-
Domain name
-
Net
-
COBOL
A
Correct answer
Explanation
Java is a programming language that was specifically designed with applets in mind - small programs that run within web browsers. The 'write once, run anywhere' philosophy of Java made it ideal for creating downloadable applets that could execute on any platform with a Java Virtual Machine. While applets are now deprecated, Java was historically the primary language for applet development. Options like Cable, Domain name, Net, and COBOL are not programming languages used for creating applets.
-
Source Code
-
Machine Language
-
High Level Language
-
Object Code
-
Assembly Language
C
Correct answer
Explanation
High-level languages are designed to be similar to human languages and easy for humans to read and write. Source code is code written in any language, Machine Language is binary (0s and 1s), Object Code is compiled machine code, and Assembly Language is low-level but still uses mnemonics.
-
It translates instructions of assembly language into 'machine language.
-
It does not translate a C program.
-
It is involved in execution of programs.
-
It is a translating program.
B
Correct answer
Explanation
An assembler is specifically designed to translate assembly language instructions into machine code. It cannot translate C programs, which require a C compiler. This statement correctly identifies what an assembler cannot do.
A
Correct answer
Explanation
The INPUT statement specifically allows programs to accept user input during execution, as opposed to hardcoded values in LET statements or output-only statements like PRINT.