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

  2. COBOL

  3. FORTRAN

  4. LISP

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

LISP (LISt Processing) was developed by John McCarthy in 1958 specifically for artificial intelligence research and remains influential in AI to this day. LISP's unique features - symbolic computation, recursive functions, and list-based data structures - made it ideal for early AI applications like natural language processing and theorem proving. Many modern AI concepts have roots in LISP, and it heavily influenced later AI languages like Prolog and Python.

Multiple choice
  1. A compiler does the same function as an interpreter.

  2. Instructions in C programs are terminated by semicolon.

  3. American National Standard Institute (ANSI) of C was set up in 1983.

  4. C is a middle level language.

  5. Both 2 and 3.

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

This option is true.

Multiple choice
  1. programming language

  2. machine language

  3. spoken language

  4. assembly language

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

Natural language refers to languages that humans use for communication, such as English, Hindi, or Spanish. This contrasts with artificial or formal languages like programming languages (Python, Java) or machine language (binary), which are designed for specific computational purposes.

Multiple choice
  1. training

  2. formula translation

  3. translation

  4. train

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

FORTRAN is a programming language whose name comes from 'FORmula TRANslation'. It was developed in the 1950s specifically for scientific and numerical computations. The name accurately describes its purpose - translating mathematical formulas into executable code.

Multiple choice
  1. Machine language

  2. English language

  3. Assembly language

  4. FORTRAN

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

High-level languages are programming languages that are more abstract and easier for humans to read and write compared to low-level languages. FORTRAN (developed in 1957) was one of the first high-level programming languages. Machine language and Assembly language are both low-level languages that work closer to the hardware. English is a natural language, not a programming language.

Multiple choice
  1. object oriented language

  2. structured language

  3. procedural language

  4. none of the above

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

C++ is primarily an object-oriented language that supports key OOP features like classes, inheritance, and polymorphism, though it also supports procedural and structured programming paradigms.

Multiple choice
  1. first generation language

  2. second generation language

  3. third generation language

  4. fourth generation language

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

SQL (Structured Query Language) is a fourth-generation language (4GL) because it provides a high-level abstraction for working with databases. Unlike 3GLs like C or Java that require detailed procedural instructions, SQL allows users to specify what data they want using declarative statements like SELECT, letting the database engine handle the implementation details.

Multiple choice
  1. prescript

  2. postscript

  3. script

  4. software

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

PostScript is a page description language specifically designed for desktop publishing to describe how pages should appear when printed or displayed. It handles fonts, graphics, and layout precisely, making it the industry standard for professional typesetting and printing.

Multiple choice
  1. Corel Draw

  2. Pascal

  3. MS Word

  4. Sybase

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

Pascal is a programming language designed for structured programming and education. Corel Draw is graphics software, MS Word is a word processor, and Sybase is a database management system - none of these are programming languages.

Multiple choice
  1. High-level programming languages are translated into machine language by compiler.

  2. ABC was the first automatic electronic digital computer.

  3. Byte represents a character.

  4. Plotter is an output device.

  5. None of these

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

All are true.

Multiple choice
  1. Build a uniform symbol table

  2. Build an identifier table

  3. Parse the source program into basic tokens

  4. All of the above

  5. -

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

Lexical analysis includes the process of converting the characters into tokens. It is combined with the parser, which analyses the syntax of programming languages.