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
-
database
-
visual programming language
-
operating system
-
visual art
B
Correct answer
Explanation
Visual Basic is a visual programming language because it allows developers to create programs visually using a drag-and-drop interface for UI elements, while writing code behind them. It is not a database, operating system, or art form.
-
System.Object
-
System.Type
-
System.Console
-
System.Enum
-
System.Environment
A
Correct answer
Explanation
This is the ultimate base class of all classes in the .NET Framework. It is the root of the type hierarchy.
-
Common Language Runtime (CLR)
-
Integrated Development Environment (IDE)
-
Microsoft Inter-mediate Language (MSIL)
-
None of these
C
Correct answer
Explanation
Microsoft Inter-mediate Language is stored on disk in an assembly that contains references to the classes that the application requires.
-
Common Type System
-
Common Language Runtime
-
.NET Framework Class Library
-
Windows Forms Application
C
Correct answer
Explanation
The .NET Framework Class Library provides pre-written code in the form of classes that are available to all of the .NET programming languages. This class library consists of hundreds of classes.
C
Correct answer
Explanation
The primary unit of .NET application is the assembly. An assembly is a self describing collection of code, resources and metadata.
-
Native Language
-
Machine Language
-
Assembly Language
-
MSIL
D
Correct answer
Explanation
MSIL stands for Microsoft Intermediate Language which is an intermediate language to which any code written in any language whether C++, C#, VB, VJ# all get converted to MSIL before getting converted to machine language.
-
high level language
-
machine language
-
assembly language
-
None of these
C
Correct answer
Explanation
Assembly language uses mnemonic opcodes (like ADD, MOV, JMP) instead of binary machine codes. Each opcode corresponds to a specific machine instruction. High-level languages use English-like statements, machine language uses raw binary, and assembly is the intermediate level using opcodes.
-
Computer business oriented language
-
Coded business operator language
-
Computer business operator language
-
Common business oriented language
D
Correct answer
Explanation
COBOL stands for Common Business Oriented Language. It was designed for business, finance, and administrative systems. The name reflects its purpose: a language for common business applications.
-
They enhance the portability of the compiler to other target processors
-
Program analysis is more accurate on intermediate code than on machine code
-
The information from dataflow analysis cannot otherwise be used for optimization
-
The information from the front end cannot otherwise be used for optimization
B
Correct answer
Explanation
Code optimization are carried out on intermediate code because program analysis is more accurate on immediate code than on machine code.
-
I and II
-
I and IV
-
III and IV
-
I, III and IV
-
Finite state automata
-
Deterministic pushdown automata
-
Non-Deterministic pushdown automata
-
Turing machine
A
Correct answer
Explanation
Lexical Analysis is implemented by finite automata.
-
parsing of the program
-
the code generation
-
the lexical analysis of the program
-
dataflow analysis
C
Correct answer
Explanation
Any identifier is also a token, so it is recognized in lexical analysis.
-
have well indented programs
-
be able to infer the flow of control from the compiled code
-
be able to infer the flow of control form the program text
-
avoid the use of GOTO statements
D
Correct answer
Explanation
Structured programming :- It is way of programming using the sub structure method, i.e splitting the programs into sub sections. Structured programming prevents confusing transfer of control of avoiding the use of GOTO statements.
-
both are procedural language
-
both are based on$\lambda$−calculus
-
both are declarative
-
all of the above
D
Correct answer
Explanation
$\lambda$-calculus" It provides the semantics for computation with functions so that properties of functional computation can be studied. Both the languages require declaration before use of any object. Both are procedural. So option (4) is correct. Both the languages are based on $\lambda$ calculus, procedural & declarative
-
a context free language
-
a context sensitive language
-
a regular language
-
parsable fully only by a turing machine
A
Correct answer
Explanation
C language is context free language entirely based upon the productions.