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

Multiple choice
  1. A combination of computer hardware

  2. A program which translates from one high-level language to another

  3. A program which translates from one high-level to a machine level

  4. None of these

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

null

Multiple choice
  1. macro

  2. for loop

  3. symbolic constant

  4. none of these

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

The #define preprocessor directive is primarily used to create symbolic constants or macros. Between the options, symbolic constant is a standard use case.

Multiple choice
  1. iteration

  2. recursion

  3. repeater

  4. none of the above

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

Recursion is a programming technique where a function calls itself to solve a problem by breaking it down into smaller, similar sub-problems.

Multiple choice
  1. two

  2. one

  3. three

  4. none of the above

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

In C, variables generally have two primary scopes: local scope (within a function or block) and global scope (accessible throughout the program).

Multiple choice
  1. declaration

  2. initialization

  3. calling

  4. none of the above

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

Header files (.h) are primarily used to store declarations of functions, variables, and macros so that they can be shared across multiple source files.