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
-
assembler
-
compiler
-
interpreter
-
operating system
-
both 2 and 3
B
Correct answer
Explanation
A compiler reads the entire program and converts it to the object code. It provides error, not of one line but error of the entire program. It takes more time for converting the lengthy programs. So this option is correct.
-
Machine language
-
Assembly language
-
Object code
-
Source code
-
Spaghetti code
A
Correct answer
Explanation
Yes, it is correct. Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU).
-
Both are procedural
-
Both are based on lambda calculus
-
Both are declarative
-
Both use Horn Clause
-
Both are imperative
C
Correct answer
Explanation
Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. Functional and logical programming languages are characterized by a declarative programming style.
-
Software bootstrapping
-
Compliler bootstrapping
-
Absolute loader
-
Linker
-
Program loading
A
Correct answer
Explanation
Here, the simplest environment will be, perhaps, a very basic text editor and an assembler program.
-
Compiler
-
Interpreter
-
YACC
-
Byte code verifier
-
Compiler bootstrapping
D
Correct answer
Explanation
It permits only some byte code sequences in valid programs.
-
MASM32 assembler
-
SPARC assembler
-
MASM assembler
-
YACC
-
The object code
C
Correct answer
Explanation
It supported a wide variety of macro facilities and structured programming idioms, including high level constructions for looping, procedure calls and alternation.
-
Lexical analysis
-
Syntax analysis
-
Compiler
-
Code generation
-
Byte code verifier
B
Correct answer
Explanation
It is to make explicit the hierarchical structure of the incoming token stream by identifying which parts of the token stream should be grouped together.
-
YACC
-
LEX
-
LALR
-
MASM32 assembler
-
SPARC assembler
B
Correct answer
Explanation
A LEX source program is consisting of a set of regular expressions together with an action for each regular expression.
-
Language processor
-
Execution gap
-
Semantic gap
-
Semantics
-
Specification gap
E
Correct answer
Explanation
It is the gap between the application domains and programming language domains.
-
Type-1 grammars
-
Type-0 grammars
-
Type-2 grammars
-
Left regular grammars
-
Right regular grammars
B
Correct answer
Explanation
Their productions permit arbitrary substitution of string during derivation or reduction, hence they are not relevant to specification of programming languages.
-
Branch group
-
Arithmetic group
-
Data transfer group
-
Logical group
-
Machine control group
A
Correct answer
Explanation
This group of instructions permits the programmer to alter the flow of program execution from a normal straight line.
-
Assembly
-
FORTRAN
-
C
-
JAVA
-
None of the above
C
Correct answer
Explanation
Writing a compiler requires modular and structured functions to execute compiler operations. One may also require to access the hardware directly, so such facility is required in the language. The language must also provide facility to handle complex data bases and structures with ease. C language provides all such facilities. So, it will be picked.
-
JAVA
-
C++
-
PROLOG
-
ASP.NET
-
None of these
C
Correct answer
Explanation
Prolog is a general purpose logic-programming language specially used for artificial intelligence.
-
Interpreter
-
Assembler
-
Compiler
-
Loader
-
Language processor
C
Correct answer
Explanation
It compiles the source code in .obj file.
-
middle-level language
-
high-level language
-
machine language
-
assembly language
-
C language
C
Correct answer
Explanation
Machine language is the only language which digital computer understands.