Programming Languages and Algorithms: Note Quiz

Loading quiz…

About this quiz

51 questions covering every section of the note.

This Lok Sewa practice set has 51 multiple-choice questions (Subject: Computer Knowledge · For: Kharidar, Nayab Subba, Section Officer · Level: Easy). Take the quiz above first; after that, use the study list below to revise every question with its correct answer and a short explanation.

Study list: all 51 questions with answers and explanations
  1. Which language is written only in binary 0 and 1?

    • A) Machine language ✔
    • B) Assembly language
    • C) High-level language
    • D) Fourth-generation language

    Why: Machine language (1GL) uses binary and is understood directly by the CPU.

  2. Assembly language uses short words such as ADD and MOV, called:

    • A) Keywords
    • B) Macros
    • C) Bytecodes
    • D) Mnemonics ✔

    Why: Assembly language uses short codes such as ADD and MOV, called mnemonics.

  3. SQL is an example of which generation of language?

    • A) Second
    • B) Fourth ✔
    • C) Third
    • D) First

    Why: SQL is a fourth-generation (4GL) language: you state what you want, not how to get it.

  4. Prolog, used in artificial intelligence, belongs to which generation?

    • A) Second
    • B) Third
    • C) Fifth ✔
    • D) Fourth

    Why: Fifth-generation languages such as Prolog are used in AI and logic programming.

  5. Which translator converts assembly language into machine code?

    • A) Compiler
    • B) Interpreter
    • C) Linker
    • D) Assembler ✔

    Why: An assembler converts assembly language into machine code.

  6. Which translator converts the whole high-level program into machine code at once?

    • A) Compiler ✔
    • B) Interpreter
    • C) Assembler
    • D) Loader

    Why: A compiler translates the entire program at one time and saves the object code.

  7. Which translator translates and runs a program one line at a time?

    • A) Compiler
    • B) Assembler
    • C) Interpreter ✔
    • D) Linker

    Why: An interpreter translates and runs a program one line at a time.

  8. The program that places an executable program into main memory to run it is the:

    • A) Linker
    • B) Loader ✔
    • C) Editor
    • D) Debugger

    Why: The loader loads the program into RAM; the linker joins object files.

  9. The C programming language was developed by:

    • A) James Gosling
    • B) Dennis Ritchie ✔
    • C) Bjarne Stroustrup
    • D) Guido van Rossum

    Why: Dennis Ritchie developed C at Bell Labs in the early 1970s.

  10. Java was developed by James Gosling at:

    • A) IBM
    • B) Microsoft
    • C) Bell Labs
    • D) Sun Microsystems ✔

    Why: James Gosling developed Java at Sun Microsystems in 1995.

  11. Who created the Python programming language?

    • A) Guido van Rossum ✔
    • B) Dennis Ritchie
    • C) John Backus
    • D) Niklaus Wirth

    Why: Guido van Rossum created Python, first released in 1991.

  12. FORTRAN stands for:

    • A) Forward Transmission
    • B) Format Transfer
    • C) Formula Translation ✔
    • D) Formal Translator

    Why: FORTRAN stands for Formula Translation.

  13. Who is known as the first computer programmer?

    • A) Charles Babbage
    • B) Grace Hopper
    • C) Ada Lovelace ✔
    • D) Alan Turing

    Why: Ada Lovelace wrote an algorithm for Babbage's Analytical Engine in the 1840s.

  14. HTML is a:

    • A) Markup language ✔
    • B) Programming language
    • C) Database language
    • D) Machine language

    Why: HTML is a markup language that structures web pages; it is not a programming language.

  15. In object-oriented programming, a new class getting the features of an existing class is called:

    • A) Encapsulation
    • B) Polymorphism
    • C) Abstraction
    • D) Inheritance ✔

    Why: Inheritance lets a new class reuse the properties of an existing class.

  16. Which is NOT a required characteristic of an algorithm?

    • A) Finiteness
    • B) Infinite loop ✔
    • C) Definiteness
    • D) Effectiveness

    Why: An algorithm must end after a limited number of steps, so an infinite loop is not allowed.

  17. In a flowchart, which symbol is used for a decision?

    • A) Rectangle
    • B) Parallelogram
    • C) Oval
    • D) Diamond ✔

    Why: A diamond in a flowchart shows a decision, such as yes/no.

  18. In a flowchart, the parallelogram is used for:

    • A) Start or stop
    • B) Process
    • C) Input or output ✔
    • D) Connector

    Why: A parallelogram in a flowchart shows input or output.

  19. An error that makes a program give the wrong answer without any error message is a:

    • A) Logical error ✔
    • B) Syntax error
    • C) Runtime error
    • D) Compile error

    Why: Logical errors produce wrong results and are not detected by the compiler.

  20. Finding and removing errors from a program is called:

    • A) Compiling
    • B) Debugging ✔
    • C) Linking
    • D) Coding

    Why: Finding and removing errors is debugging.

  21. A set of instructions given to a computer is a:

    • A) Hardware
    • B) Program ✔
    • C) Port
    • D) Cable

    Why: A program is a set of instructions given to a computer.

  22. Machine language uses:

    • A) English words
    • B) Pictures
    • C) Binary 0s and 1s ✔
    • D) Flowcharts

    Why: Machine language uses binary 0s and 1s that the CPU understands directly.

  23. Assembly language uses:

    • A) Only binary
    • B) Plain English
    • C) Pictures
    • D) Mnemonics like ADD and MOV ✔

    Why: Assembly language uses mnemonics like ADD and MOV.

  24. A program that converts assembly language into machine code is an:

    • A) Assembler ✔
    • B) Compiler
    • C) Interpreter
    • D) Editor

    Why: An assembler converts assembly language into machine code.

  25. A compiler translates:

    • A) One line at a time
    • B) The whole program at once ✔
    • C) Only assembly
    • D) Only HTML

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

  26. An interpreter translates:

    • A) The whole program at once
    • B) Only binary
    • C) One line at a time ✔
    • D) Only images

    Why: An interpreter translates one line at a time.

  27. Python is usually run by an:

    • A) Assembler
    • B) Linker only
    • C) Loader only
    • D) Interpreter ✔

    Why: Python is usually run by an interpreter.

  28. C is an example of a:

    • A) High-level compiled language ✔
    • B) Machine language
    • C) Assembly language
    • D) Markup language

    Why: C is a high-level compiled language.

  29. SQL is used for:

    • A) Drawing pictures
    • B) Writing emails
    • C) Managing databases ✔
    • D) Designing circuits

    Why: SQL is used for managing and querying databases.

  30. Java programs are compiled into:

    • A) Machine code directly only
    • B) HTML
    • C) SQL
    • D) Bytecode ✔

    Why: Java is compiled into bytecode, which the Java Virtual Machine runs.

  31. A step-by-step procedure to solve a problem is an:

    • A) Algorithm ✔
    • B) Flowchart symbol
    • C) Compiler
    • D) Variable

    Why: An algorithm is a step-by-step procedure to solve a problem.

  32. A diagram that shows the steps of an algorithm is a:

    • A) Pie chart
    • B) Flowchart ✔
    • C) Bar chart
    • D) Table

    Why: A flowchart is a diagram showing the steps of an algorithm.

  33. In a flowchart, the oval symbol shows:

    • A) Process
    • B) Decision
    • C) Start/End ✔
    • D) Input/Output

    Why: The oval symbol shows Start or End.

  34. In a flowchart, the diamond symbol shows:

    • A) Process
    • B) Start
    • C) Input
    • D) Decision ✔

    Why: The diamond symbol shows a decision.

  35. In a flowchart, the rectangle shows:

    • A) Process ✔
    • B) Decision
    • C) Start
    • D) Connector

    Why: The rectangle symbol shows a process.

  36. In a flowchart, the parallelogram shows:

    • A) Decision
    • B) Input/Output ✔
    • C) Process
    • D) Start/End

    Why: The parallelogram shows input or output.

  37. An error in the rules (grammar) of a programming language is a:

    • A) Logical error
    • B) Runtime error
    • C) Syntax error ✔
    • D) Hardware error

    Why: Breaking the grammar rules of a language is a syntax error.

  38. A program that runs but gives wrong results has a:

    • A) Syntax error
    • B) Compile error
    • C) Network error
    • D) Logical error ✔

    Why: A program that runs but gives wrong results has a logical error.

  39. Finding and fixing errors in a program is called:

    • A) Debugging ✔
    • B) Compiling
    • C) Formatting
    • D) Booting

    Why: Finding and fixing errors in a program is debugging.

  40. A named storage location for data in a program is a:

    • A) Function key
    • B) Variable ✔
    • C) Port
    • D) Register only

    Why: A variable is a named storage location for data.

  41. A repeated set of instructions in a program is a:

    • A) Variable
    • B) Comment
    • C) Loop ✔
    • D) Compiler

    Why: A loop repeats a set of instructions.

  42. Object-oriented programming is based on:

    • A) Only binary
    • B) Only flowcharts
    • C) Only hardware
    • D) Objects and classes ✔

    Why: Object-oriented programming is based on objects and classes.

  43. Which is an object-oriented language?

    • A) Java ✔
    • B) HTML
    • C) Assembly
    • D) Machine code

    Why: Java is an object-oriented language.

  44. Programming languages close to human language are called:

    • A) Low-level languages
    • B) High-level languages ✔
    • C) Machine languages
    • D) Binary languages

    Why: High-level languages are close to human language.

  45. Machine and assembly languages are called:

    • A) High-level languages
    • B) Markup languages
    • C) Low-level languages ✔
    • D) Query languages

    Why: Machine and assembly languages are low-level languages, close to the hardware.

  46. Software that is free to use, modify and share with source code is:

    • A) Proprietary software
    • B) Shareware only
    • C) Malware
    • D) Open-source software ✔

    Why: Open-source software is free to use, modify and share, with its source code.

  47. Linux is an example of:

    • A) Open-source software ✔
    • B) Proprietary software
    • C) Hardware
    • D) Virus

    Why: Linux is open-source software.

  48. The person who writes computer programs is a:

    • A) Operator only
    • B) Programmer ✔
    • C) Typist
    • D) Technician only

    Why: A programmer writes computer programs.

  49. The first high-level programming language widely used was:

    • A) Python
    • B) Java
    • C) FORTRAN ✔
    • D) C++

    Why: FORTRAN (1957) was the first widely used high-level language.

  50. A program that combines compiled object files into one executable is a:

    • A) Linker ✔
    • B) Editor
    • C) Browser
    • D) Debugger

    Why: A linker combines compiled object files into one executable program.

  51. Writing notes in code that the computer ignores is called:

    • A) Commenting ✔
    • B) Compiling
    • C) Looping
    • D) Linking

    Why: Comments are notes in code that the computer ignores.

Loksewa Pathsala is an independent educational platform. It is not affiliated with the Public Service Commission (Lok Sewa Aayog) or the Government of Nepal. · लोक सेवा आयोगको आधिकारिक साइट होइन। · Sources & disclaimer
Scroll to Top