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. Machine

  2. Application Language

  3. Low-level Language

  4. High-level Language

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

Functional languages, such as Lisp or Haskell, are often referred to as application languages because they are designed to solve problems by evaluating functions rather than executing a sequence of imperative commands.

Multiple choice
  1. low level languages

  2. high level languages

  3. both (1) and (2)

  4. none of the above

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

Machine language and assembly language are considered low-level languages because they are very close to the hardware architecture and require little to no abstraction.

Multiple choice
  1. Is used to control a keyboard, CRT Screen, and disks.

  2. Became the Standard Programming Language for personal computers.

  3. Was initially designed to be used by non-programmers.

  4. Both (1) and (2).

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

CP/M (Control Program for Microcomputers) was an operating system that provided a standardized way for software to interact with hardware like keyboards, screens, and disk drives.

Multiple choice
  1. x is a 4-digit integer

  2. x cannot be greater than a 4 digit integer

  3. x is a 4-bit integer

  4. none of above

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

In C, the colon syntax in a struct declaration defines a bit-field. The integer x : 4 specifies that x will occupy exactly 4 bits of storage.

Multiple choice
  1. a tool for analyzing a C program

  2. an interactive debugger

  3. a C interpreter

  4. a C compiler

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

Lint is a classic static code analysis tool used in C programming to flag programming errors, bugs, stylistic errors, and suspicious constructs. It is neither a compiler, an interpreter, nor an interactive debugger.

Multiple choice
  1. int < unsigned < float < double

  2. unsigned < int < float < double

  3. int< unsigned < double < float

  4. unsigned < int < double < float

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

The standard C implicit type conversion hierarchy (integer promotion and usual arithmetic conversions) is: int < unsigned < float < double.