Free Programming Basics MCQs with Answers

183 Programming Basics MCQs from Computer Science and IT, each with the correct answer and a written explanation of why it is correct. Free and unlimited, with no account needed.

Programming basics covers algorithms, flowcharts, pseudocode, variables, constants, data types, operators, input and output, conditional statements and loops. It also introduces functions, arrays, strings, debugging and common programming errors, with attention to the difference between syntax errors, runtime errors and logical errors in a program.

Last updated

183 questions · page 2 of 10

Fairly easy
  • A. BASIC
  • B. Assembler
  • C. Java
  • D. COBOL

Explanation: Java was widely used for interactive and multimedia content on web pages, especially through Java applets in earlier web development. BASIC, assembler and COBOL were not intended for this role.

Correct answer: Java
Hard
  • A. Ada Lovelace
  • B. Allegra Byron
  • C. Lady Augusta
  • D. Allegra Noel-Byron

Explanation: Ada Lovelace is widely regarded as the first computer programmer because she wrote an algorithm for Charles Babbage's Analytical Engine. The other names are alternate or incorrect forms associated with her full name.

Correct answer: Ada Lovelace
Fairly easy
  • A. Deniss Ritche
  • B. Linus Torvalds
  • C. James Gosling
  • D. Bajarnae

Explanation: James Gosling led the team that developed Java at Sun Microsystems, earning him the title commonly associated with Java's invention. Dennis Ritchie created C, while Linus Torvalds created Linux.

Correct answer: James Gosling
Easy
  • A. Processor Hypertext Program
  • B. Hypertext Preprocessor
  • C. Pre Hypertext Processor
  • D. Pre Processor Hypertext

Explanation: PHP is commonly expanded as Hypertext Preprocessor, a recursive name for a server-side scripting language. It was historically associated with “Personal Home Page,” but that option is not provided.

Correct answer: Hypertext Preprocessor
Moderate
  • A. Formula transistor
  • B. Formula translation
  • C. Formula train network
  • D. Formula translation network

Explanation: FORTRAN comes from “Formula Translation,” reflecting its original design for scientific and mathematical computation. The other choices add words that are not part of the name.

Correct answer: Formula translation
Moderate
  • A. Common Book Oriented Language
  • B. Common Basic Oriented Language
  • C. Common Boot Oriented Language
  • D. Common Business Oriented Language

Explanation: COBOL means Common Business-Oriented Language, a programming language designed mainly for business data processing. “Business” is the distinguishing word among the choices.

Correct answer: Common Business Oriented Language
Fairly easy
  • A. Active Start Pages
  • B. Action Start Pages
  • C. Active Server Pages
  • D. Active Standalone Pages

Explanation: ASP means Active Server Pages, a Microsoft server-side scripting technology used to generate dynamic web pages. “Server” identifies that the code is processed on the web server.

Correct answer: Active Server Pages
Moderate
  • A. An interpreter does the conversion line by line as the program is run.
  • B. An interpreter is the representation of the system being designed.
  • C. An interpreter is a general purpose language providing very efficient execution.
  • D. None of these

Explanation: An interpreter translates and executes source code step by step while the program runs, rather than producing a complete machine-code program beforehand. This line-by-line execution commonly makes interpreted programs easier to test but slower than compiled ones.

Correct answer: An interpreter does the conversion line by line as the program is run.
Moderate
  • A. High level language
  • B. Low level language
  • C. Assembly language
  • D. Machine language

Explanation: High-level languages are generally machine independent because the same source program can be compiled or interpreted for different systems. Assembly and machine languages depend closely on a particular processor architecture.

Correct answer: High level language
Very hard
  • A. Machine
  • B. Application language
  • C. Low-level language
  • D. High-level language

Explanation: Functional languages are also called applicative languages because programs compute by applying functions to values. High-level language is a broader category, while machine and low-level languages refer to closer-to-hardware programming.

Correct answer: Application language
Moderate
  • A. High-level language
  • B. Codes
  • C. Programs
  • D. Mnemonics

Explanation: A compiler or interpreter is software made up of instructions, so it is itself a program. It translates or executes code written in a programming language rather than being a language, code notation, or mnemonic.

Correct answer: Programs
Easy
  • A. Algorithmic Protocol Interface
  • B. Adapter Protocol Interface
  • C. Application Programming Interface
  • D. Accellerated Programming Interface

Explanation: API means Application Programming Interface, a defined set of rules and operations through which one software component can communicate with another.

Correct answer: Application Programming Interface
Fairly easy
  • A. Niklaus Wirth
  • B. Ada Lovelace
  • C. Bill Gates
  • D. Dennis Ritchie

Explanation: Ada Lovelace is widely recognized as the first computer programmer because she wrote an algorithm for Charles Babbage's Analytical Engine. The other names belong to later developments in programming and computing.

Correct answer: Ada Lovelace
Moderate
  • A. Syntax Error
  • B. Logical Error
  • C. Both Logical and Syntax Error
  • D. None of these

Explanation: A compiler detects syntax errors because it checks whether program statements follow the language rules. Logical errors may produce validly compiled programs but incorrect results, so they usually require testing and debugging.

Correct answer: Syntax Error
Fairly easy
  • A. Debugging
  • B. Defusing
  • C. Defragmenting
  • D. Defrosting

Explanation: Debugging is the process of finding and correcting errors, or bugs, in program code. Defragmenting instead reorganizes data on a storage device.

Correct answer: Debugging
Fairly easy
  • A. Compiler
  • B. Interpreter
  • C. Debugger
  • D. Assembler

Explanation: An assembler translates assembly-language mnemonics and operands into machine-language instructions. A compiler generally translates a high-level language, while an interpreter executes translated statements incrementally.

Correct answer: Assembler
Moderate
  • A. High level languages must be converted into machine language to execute
  • B. High level language programs are more efficient and faster to execute
  • C. It is more difficult to identify errors in high level language program than in low level programs
  • D. All of above

Explanation: A high-level program must be translated into machine code, either before execution by a compiler or during execution by an interpreter. High-level code is generally easier, not harder, to understand and debug, and it is not necessarily faster than low-level code.

Correct answer: High level languages must be converted into machine language to execute
Very hard
  • A. cross-platform programming
  • B. 3GL business programming
  • C. event driven programming
  • D. functional

Explanation: Functional languages express computation through mathematical-style functions and the evaluation of expressions. The other options describe portability, business programming, or a programming approach based on events.

Correct answer: functional
Fairly easy
  • A. Interpreter
  • B. High level
  • C. Compiler
  • D. Executable

Explanation: An executable program has been translated into a form the operating system and processor can run directly. An interpreter or compiler is a translation tool, while “high level” describes a language rather than a ready-to-run program.

Correct answer: Executable
Fairly easy
  • A. documentation
  • B. output
  • C. reporting
  • D. spec sheets

Explanation: Documentation records the programming process, program details, test results, and related printouts so the system can be understood and maintained. Output refers only to the results produced by a program.

Correct answer: documentation