Programming Languages MCQs 2026

45 questions with detailed answers · 20 from past papers · 5 quiz batches available

📚 Computer📄 20 Past-Paper Qs✓ Free · No Login Needed
🎯 Mock Test

Read each question, think about the answer, then click Show Answer to reveal the correct option and explanation. Load 10 at a time so it stays manageable — perfect for one-topic study sessions on the bus or during a break.

Page 1 of 1Questions 1–10 of 45
  1. Q1medium

    Which symbol is commonly used to write single-line comments in many languages

    1. A@
    2. B//
    3. C&
    4. D$
    💡 Explanation:

    Many languages such as C++, Java and JavaScript use // for single-line comments.

  2. Q2Past Paper · PPSC/FPSC/NTSeasy

    A language that a computer can directly understand is

    1. AHigh-level language
    2. BAssembly language
    3. CMachine language
    4. DEnglish
    💡 Explanation:

    Machine language, written in binary, is directly understood by the computer.

  3. Q3Past Paper · PPSC/FPSC/NTSeasy

    Machine language is written using

    1. ABinary digits (0s and 1s)
    2. BEnglish words
    3. CDecimal numbers
    4. DSymbols only
    💡 Explanation:

    Machine language is written using binary digits, 0s and 1s.

  4. Q4medium

    Which of the following is a low-level language

    1. APython
    2. BJava
    3. CC++
    4. DAssembly language
    💡 Explanation:

    Assembly language is a low-level, machine-dependent language.

  5. Q5Past Paper · PPSC/FPSC/NTSmedium

    A program that converts assembly language into machine code is a/an

    1. ACompiler
    2. BAssembler
    3. CInterpreter
    4. DEditor
    💡 Explanation:

    An assembler converts assembly language into machine code.

  6. Q6Past Paper · PPSC/FPSC/NTSmedium

    A compiler translates a program

    1. AOne line at a time
    2. BInto assembly only
    3. CAll at once into machine code
    4. DInto English
    💡 Explanation:

    A compiler translates the whole program into machine code at once.

  7. Q7Past Paper · PPSC/FPSC/NTSmedium

    An interpreter translates a program

    1. AOne line at a time
    2. BAll at once
    3. CInto assembly
    4. DInto binary permanently
    💡 Explanation:

    An interpreter translates and executes a program line by line.

  8. Q8Past Paper · PPSC/FPSC/NTSeasy

    The human-readable program written by a programmer is called

    1. AObject code
    2. BMachine code
    3. CBinary code
    4. DSource code
    💡 Explanation:

    Source code is the human-readable program written by a programmer.

  9. Q9medium

    The machine code produced after translation is called

    1. ASource code
    2. BObject code
    3. CPseudocode
    4. DHigh-level code
    💡 Explanation:

    Object code is the machine code produced after compiling source code.

  10. Q10medium

    The set of rules that govern the structure of a programming language is its

    1. ASyntax
    2. BAlgorithm
    3. CFlowchart
    4. DLoop
    💡 Explanation:

    Syntax is the set of grammatical rules of a programming language.

  11. Q11Past Paper · PPSC/FPSC/NTSeasy

    A step-by-step procedure to solve a problem is called a/an

    1. AProgram
    2. BSyntax
    3. CAlgorithm
    4. DCompiler
    💡 Explanation:

    An algorithm is a step-by-step procedure for solving a problem.

  12. Q12Past Paper · PPSC/FPSC/NTSeasy

    A graphical representation of an algorithm is called a

    1. AProgram
    2. BPseudocode
    3. CSyntax
    4. DFlowchart
    💡 Explanation:

    A flowchart graphically represents the steps of an algorithm.

  13. Q13Past Paper · PPSC/FPSC/NTSmedium

    Which was the first high-level programming language

    1. ACOBOL
    2. BFORTRAN
    3. CC
    4. DBASIC
    💡 Explanation:

    FORTRAN, developed in 1957, was the first high-level programming language.

  14. Q14Past Paper · PPSC/FPSC/NTSmedium

    The C programming language was developed by

    1. ADennis Ritchie
    2. BJames Gosling
    3. CGuido van Rossum
    4. DBjarne Stroustrup
    💡 Explanation:

    Dennis Ritchie developed the C language at Bell Labs around 1972.

  15. Q15Past Paper · PPSC/FPSC/NTSmedium

    The C++ programming language was developed by

    1. ADennis Ritchie
    2. BJames Gosling
    3. CBjarne Stroustrup
    4. DGuido van Rossum
    💡 Explanation:

    Bjarne Stroustrup developed C++ as an extension of C.

  16. Q16Past Paper · PPSC/FPSC/NTSmedium

    The Java programming language was developed by

    1. ADennis Ritchie
    2. BGuido van Rossum
    3. CBjarne Stroustrup
    4. DJames Gosling
    💡 Explanation:

    James Gosling developed Java at Sun Microsystems.

  17. Q17Past Paper · PPSC/FPSC/NTSmedium

    The Python programming language was created by

    1. AJames Gosling
    2. BGuido van Rossum
    3. CDennis Ritchie
    4. DGrace Hopper
    💡 Explanation:

    Guido van Rossum created Python in 1991.

  18. Q18Past Paper · PPSC/FPSC/NTSmedium

    COBOL was designed mainly for

    1. ABusiness applications
    2. BScientific research
    3. CGaming
    4. DOperating systems
    💡 Explanation:

    COBOL was designed for business data processing applications.

  19. Q19Past Paper · PPSC/FPSC/NTSmedium

    FORTRAN was designed mainly for

    1. ABusiness
    2. BGaming
    3. CScientific and engineering calculations
    4. DWeb design
    💡 Explanation:

    FORTRAN (Formula Translation) was designed for scientific and engineering computation.

  20. Q20Past Paper · PPSC/FPSC/NTSeasy

    Which of the following is NOT a programming language

    1. AJava
    2. BPython
    3. CC++
    4. DHTML
    💡 Explanation:

    HTML is a markup language, not a programming language.

  21. Q21easy

    A named memory location that stores a value in a program is called a

    1. ALoop
    2. BVariable
    3. CFunction
    4. DClass
    💡 Explanation:

    A variable is a named memory location that stores a value.

  22. Q22easy

    A programming construct that repeats a block of code is called a

    1. ALoop
    2. BVariable
    3. CConstant
    4. DComment
    💡 Explanation:

    A loop repeats a block of code multiple times.

  23. Q23easy

    The process of finding and removing errors from a program is called

    1. ACompiling
    2. BCoding
    3. CDebugging
    4. DRunning
    💡 Explanation:

    Debugging is the process of finding and fixing errors in a program.

  24. Q24Past Paper · PPSC/FPSC/NTSeasy

    An error in a program is commonly called a

    1. AVirus
    2. BLoop
    3. CSyntax
    4. DBug
    💡 Explanation:

    An error or fault in a program is commonly called a bug.

  25. Q25medium

    Which of these is an object-oriented programming language

    1. AFORTRAN
    2. BJava
    3. CAssembly
    4. DMachine code
    💡 Explanation:

    Java is an object-oriented programming language.

  26. Q26medium

    The four main concepts of OOP are inheritance, polymorphism, abstraction and

    1. AEncapsulation
    2. BCompilation
    3. CIteration
    4. DDebugging
    💡 Explanation:

    The four pillars of OOP are inheritance, polymorphism, abstraction and encapsulation.

  27. Q27medium

    In OOP, a blueprint for creating objects is called a

    1. AVariable
    2. BLoop
    3. CClass
    4. DFunction
    💡 Explanation:

    A class is a blueprint used to create objects in OOP.

  28. Q28Past Paper · PPSC/FPSC/NTSmedium

    Machine language is also known as which generation language

    1. AThird
    2. BFourth
    3. CSecond
    4. DFirst
    💡 Explanation:

    Machine language is a first-generation language (1GL).

  29. Q29medium

    Assembly language belongs to which generation of languages

    1. AFirst
    2. BSecond
    3. CThird
    4. DFourth
    💡 Explanation:

    Assembly language is a second-generation language (2GL).

  30. Q30medium

    High-level languages belong to which generation

    1. AThird
    2. BFirst
    3. CSecond
    4. DFifth
    💡 Explanation:

    High-level languages are third-generation languages (3GL).

  31. Q31medium

    High-level languages are

    1. AMachine dependent
    2. BWritten in binary
    3. CMachine independent and easier to use
    4. DDirectly executed
    💡 Explanation:

    High-level languages are machine independent and easier for humans to use.

  32. Q32medium

    Which language uses mnemonics like ADD, SUB and MOV

    1. AMachine language
    2. BPython
    3. CJava
    4. DAssembly language
    💡 Explanation:

    Assembly language uses mnemonics such as ADD, SUB and MOV.

  33. Q33medium

    A compiler reports which type of errors

    1. ASpelling errors in text
    2. BSyntax errors in code
    3. CHardware errors
    4. DNetwork errors
    💡 Explanation:

    A compiler detects and reports syntax errors in the source code.

  34. Q34medium

    The BASIC programming language was designed for

    1. ABeginners
    2. BScientists
    3. CExperts only
    4. DSystem programmers
    💡 Explanation:

    BASIC (Beginners All-purpose Symbolic Instruction Code) was designed for beginners.

  35. Q35medium

    Which of the following is an interpreted language

    1. AC
    2. BC++
    3. CFORTRAN
    4. DPython
    💡 Explanation:

    Python is typically an interpreted language.

  36. Q36medium

    Pseudocode is

    1. AActual machine code
    2. BA programming language
    3. CAn informal description of program logic
    4. DA type of hardware
    💡 Explanation:

    Pseudocode is an informal, human-readable description of program logic.

  37. Q37hard

    The Pascal language was developed by

    1. ADennis Ritchie
    2. BNiklaus Wirth
    3. CGuido van Rossum
    4. DJames Gosling
    💡 Explanation:

    Niklaus Wirth developed the Pascal programming language.

  38. Q38medium

    A major advantage of Java is that it is

    1. APlatform independent
    2. BMachine dependent
    3. CWritten in binary
    4. DNon-object-oriented
    💡 Explanation:

    Java is platform independent thanks to the Java Virtual Machine (JVM).

  39. Q39easy

    A single instruction in a programming language is called a

    1. ALoop
    2. BVariable
    3. CBug
    4. DStatement
    💡 Explanation:

    A statement is a single instruction in a program.

  40. Q40easy

    Converting an algorithm into a programming language is called

    1. ADebugging
    2. BTesting
    3. CCoding
    4. DDesigning
    💡 Explanation:

    Coding is the process of writing an algorithm in a programming language.

  41. Q41Past Paper · PPSC/FPSC/NTSeasy

    OOP stands for

    1. AObject Oriented Programming
    2. BOrdered Output Process
    3. COpen Operation Protocol
    4. DObject Output Programming
    💡 Explanation:

    OOP stands for Object Oriented Programming.

  42. Q42medium

    Which of the following translates the entire source code before execution

    1. AInterpreter
    2. BAssembler
    3. CEditor
    4. DCompiler
    💡 Explanation:

    A compiler translates the entire source code into machine code before execution.

  43. Q43easy

    A reusable collection of statements that performs a specific task is called a

    1. ALoop
    2. BVariable
    3. CFunction
    4. DConstant
    💡 Explanation:

    A function is a reusable block of code that performs a specific task.

  44. Q44medium

    Machine-dependent languages are also called

    1. AHigh-level languages
    2. BLow-level languages
    3. CNatural languages
    4. DQuery languages
    💡 Explanation:

    Machine-dependent languages such as machine and assembly are low-level languages.

  45. Q45Past Paper · PPSC/FPSC/NTSmedium

    Grace Hopper is closely associated with which language

    1. AC
    2. BPython
    3. CJava
    4. DCOBOL
    💡 Explanation:

    Grace Hopper played a key role in the development of COBOL.