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. Serial Template Library

  2. Simple Template Library

  3. Standard Template Library

  4. Single Type Library

  5. Static Template Library

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

Standard Template Library (STL) is a C++ software library. It is the corect expansion of the term.

Multiple choice
  1. Java

  2. Cable

  3. Domain name

  4. Net

  5. COBOL

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

Multiple choice
  1. Source Code

  2. Machine Language

  3. High Level Language

  4. Object Code

  5. Assembly Language

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

Multiple choice
  1. It translates instructions of assembly language into 'machine language.

  2. It does not translate a C program.

  3. It is involved in execution of programs.

  4. It is a translating program.

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

Multiple choice
  1. Common Object

  2. Common

  3. Common Operating

  4. Computer Oriented

  5. None of these

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

COBOL stands for Common Business-Oriented Language, so CO stands for 'Common'. The name reflects its design for business data processing applications.

Multiple choice
  1. machine language, high-level language, and assembly language

  2. machine language, high-level language, and binary representation

  3. binary representation, machine language, and assembly language

  4. machine language, assembly language, and high-level language

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

Machine language uses raw binary instructions directly executed by the CPU. Assembly language adds mnemonics for machine instructions but remains hardware-specific. High-level languages use human-readable abstractions and are machine-independent.

Multiple choice
  1. differ depending on the type of computer on which they are to be executed

  2. contain instructions written in 1s and 0s

  3. do not require knowledge of the internal operations of the computer

  4. more closely resemble English than BASIC

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

Assembly language is machine-dependent because its instructions directly map to specific CPU architectures and instruction sets. Different processor families have different assembly languages, unlike portable high-level languages like BASIC.

Multiple choice
  1. values

  2. numbers

  3. commands

  4. names

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

High-level languages use descriptive names as symbolic references to memory locations and values. These names make programs readable for programmers while the compiler handles memory addresses.