Computer Language Questions with Solutions
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.
- Q21.
Process of writing computer instruction in programming language is known as
A. AssemblingB. CompilingC. ExecutingD. CodingeasyAsked in TCS ExamView solution › - Q22.
First generation programming language used
A. TranslatorB. Machine level languageC. CompilerD. AssemblereasyAsked in TCS ExamView solution › - Q23.
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 programmereasyAsked in TCS ExamView solution › - Q24.
C++ is a __________
A. Symbolic programming languageB. Operating systemC. Functional programming languageD. Object oriented programming languageeasyAsked in TCS ExamView solution › - Q25.
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 › - Q26.
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 › - Q27.
Assuming that all operations take their operands from registers, what is the minimum number of registers needed to execute this program without spilling any variable to memory? (a = 1)
A. 6B. 4C. 5D. 3hardAsked in NIMCET 2024View solution › - Q28.
Given an unsigned 32-bit integer x, which of the following C/C++ expressions correctly toggles m bits starting from position p (with the least significant bit at position 0)?
A. x & ~(((1 << m) - 1) << p)B. x ^ ((1 << m) << p)C. x ^ (((1 << m) - 1) << p)D. x | ((1 << m) << p)mediumAsked in NIMCET 2025View solution › - Q29.
Match all items in Group 1 with the correct options from those given in Group 2.
A. P-4, Q-2, R-3, S-1B. P-2, Q-3, R-1, S-4C. P-1, Q-2, R-3, S-4D. P-2, Q-3, R-4, S-1mediumAsked in NIMCET 2025View solution ›