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

Multiple choice
  1. database

  2. visual programming language

  3. operating system

  4. visual art

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Common Type System

  2. Common Language Runtime

  3. .NET Framework Class Library

  4. Windows Forms Application

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. high level language

  2. machine language

  3. assembly language

  4. None of these

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Computer business oriented language

  2. Coded business operator language

  3. Computer business operator language

  4. Common business oriented language

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. They enhance the portability of the compiler to other target processors

  2. Program analysis is more accurate on intermediate code than on machine code

  3. The information from dataflow analysis cannot otherwise be used for optimization

  4. The information from the front end cannot otherwise be used for optimization

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. I and II

  2. I and IV

  3. III and IV

  4. I, III and IV

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Multiple choice
  1. have well indented programs

  2. be able to infer the flow of control from the compiled code

  3. be able to infer the flow of control form the program text

  4. avoid the use of GOTO statements

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. both are procedural language

  2. both are based on$\lambda$−calculus
  3. both are declarative

  4. all of the above

Reveal answer Fill a bubble to check yourself
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

Multiple choice
  1. a context free language

  2. a context sensitive language

  3. a regular language

  4. parsable fully only by a turing machine

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

C language is context free language entirely based upon the productions.