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

  2. compiler

  3. interpreter

  4. operating system

  5. both 2 and 3

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

A compiler reads the entire program and converts it to the object code. It provides error, not of one line but error of the entire program. It takes more time for converting the lengthy programs. So this option is correct.

Multiple choice
  1. Machine language

  2. Assembly language

  3. Object code

  4. Source code

  5. Spaghetti code

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

Yes, it is correct. Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU).

Multiple choice
  1. Both are procedural

  2. Both are based on lambda calculus

  3. Both are declarative

  4. Both use Horn Clause

  5. Both are imperative

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

Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. Functional and logical programming languages are characterized by a declarative programming style.

Multiple choice
  1. Type-1 grammars

  2. Type-0 grammars

  3. Type-2 grammars

  4. Left regular grammars

  5. Right regular grammars

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

Their productions permit arbitrary substitution of string during derivation or reduction, hence they are not relevant to specification of programming languages.

Multiple choice
  1. Assembly

  2. FORTRAN

  3. C

  4. JAVA

  5. None of the above

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

Writing a compiler requires modular and structured functions to execute compiler operations. One may also require to access the hardware directly, so such facility is required in the language. The language must also provide facility to handle complex data bases and structures with ease. C language provides all such facilities. So, it will be picked.