Computer Language Questions with Solutions

29 questions24 easy4 medium1 hard

A computer language is a formal language used to write instructions for a computer. This topic covers the levels of programming languages: machine language (binary code the CPU runs directly), assembly language (which uses short mnemonics such as ADD and MOV), and high-level languages such as C, C++, Java and Python, which are closer to human language. It also covers language translators (assemblers, compilers and interpreters), generations of programming languages from 1GL to 5GL, programming paradigms (procedural, object-oriented, functional and logic programming), and basic concepts such as source code, object code, syntax errors and logical errors. Exam questions often ask which translator is used for which language level, which language is machine-dependent, and the main features of object-oriented programming (encapsulation, inheritance, polymorphism and abstraction). Practise the computer language questions below. Each answer includes an explanation.

  1. Q21.

    A compiler means

    A. A program which converts source program into object programB. Key punch operatorC. A person who compiles source programsD. The same thing as programmer
    easyAsked in TCS ExamView solution ›
  2. Q22.

    C++ is a __________

    A. Symbolic programming languageB. Operating systemC. Functional programming languageD. Object oriented programming language
    easyAsked in TCS ExamView solution ›
  3. Q23.

    Which one of the following statements is always true?

    A. A compiled program uses more memory than an interpreted program.B. A compiler converts a program to a lower level language for execution.C. A compiler for a high level language takes less memory than its interpreter.D. Compiled programs take more time to execute than interpreted programs.
    easyAsked in NIMCET 2008View solution ›
  4. Q24.

    Let be an array with for . After the assignment is executed, the value of is equal to

    A. undefinedB. C. D.
    easyAsked in NIMCET 2008View solution ›
‹ PreviousPage 2 of 2