Intro To Programming Final

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Beenu_65
B
Beenu_65
Community Contributor
Quizzes Created: 1 | Total Attempts: 101
Questions: 31 | Attempts: 101

SettingsSettingsSettings
Intro To Programming Final - Quiz


Questions and Answers
  • 1. 

    A Computer is ____

    • A.

      A typewriter

    • B.

      An electronic device

    • C.

      A calculator

    • D.

      None of these

    Correct Answer
    B. An electronic device
    Explanation
    The correct answer is "an electronic device" because a computer is a machine that can perform various tasks by processing information. It uses electronic components and circuits to manipulate and store data, perform calculations, and communicate with other devices. While a computer can perform tasks similar to a typewriter or a calculator, it is not limited to those functions alone. Therefore, the most accurate description for a computer is an electronic device.

    Rate this question:

  • 2. 

    The basic operations performed by a computers are

    • A.

      Arithmetic operation

    • B.

      Logical operation

    • C.

      Storage and relative

    • D.

      All the above

    Correct Answer
    D. All the above
    Explanation
    The basic operations performed by a computer include arithmetic operations, such as addition, subtraction, multiplication, and division. Logical operations involve comparisons and decision-making processes, such as AND, OR, and NOT operations. Storage operations involve saving and retrieving data from memory or storage devices. Therefore, all of the given options are correct as they encompass the fundamental operations performed by computers.

    Rate this question:

  • 3. 

    How many bytes is 1K Byte ?

    • A.

      1000

    • B.

      1024

    • C.

      512

    • D.

      256

    Correct Answer
    B. 1024
    Explanation
    The correct answer is 1024. In computing, a kilobyte (KB) is traditionally defined as 1024 bytes, not 1000 bytes. This is because computers use a binary system, where numbers are represented in base 2, rather than base 10. In base 2, 1024 is the nearest power of 2 to 1000, making it the standard measurement for a kilobyte in the context of computer memory and storage.

    Rate this question:

  • 4. 

    What is computer

    • A.

      Nesto sto radi

    • B.

      Zabaviliste

    • C.

      Igrica

    • D.

      Masina

    • E.

      Tv

    Correct Answer
    D. Masina
  • 5. 

    Computer understand only binary language

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Computers understand and process information using a binary language, which consists of only two symbols: 0 and 1. This binary system is the foundation of all computer operations, as it represents the on and off states of electronic switches within the computer's hardware. Each 0 or 1 is known as a bit, and a sequence of bits forms bytes, which are used to represent data and instructions. Therefore, it is correct to say that computers understand only binary language.

    Rate this question:

  • 6. 

    What is the extension of computer applications?

    • A.

      Mp3

    • B.

      Exe

    • C.

      Jar

    • D.

      Jpg

    Correct Answer
    B. Exe
    Explanation
    The correct answer is "exe". The extension "exe" stands for "executable" and is commonly used for computer applications that can be run or executed on a computer. This extension is primarily associated with Windows operating systems and represents a file format that contains instructions for the computer to perform specific tasks or functions.

    Rate this question:

  • 7. 

    What is called the brain of computer

    Correct Answer
    CPU, cpu, central processing unit, Central Processing Unit
    Explanation
    The brain of a computer is known as the CPU (Central Processing Unit). It is responsible for executing instructions and performing calculations in a computer system. The CPU acts as the control center, managing and coordinating all the activities of the computer's hardware and software components. It carries out tasks such as fetching, decoding, and executing instructions, as well as performing arithmetic and logical operations. The CPU plays a crucial role in the overall performance and functionality of a computer.

    Rate this question:

  • 8. 

    What is the full form of VIRUS

    • A.

      Vital information resource under siege

    • B.

      Vital information reference under sequence

    • C.

      Virus introduction resource under sex

    • D.

      Virtual intrology reformer under sense

    Correct Answer
    A. Vital information resource under siege
    Explanation
    The correct answer is "vital information resource under siege." This full form of VIRUS is commonly used in the context of computer viruses, where a virus is a malicious program that can infect and harm a computer system. The term "vital information resource" refers to the valuable data and resources that are targeted by such viruses, and "under siege" implies that they are under attack or threat.

    Rate this question:

  • 9. 

    CPU is known as 

    • A.

      Software

    • B.

      Operating System

    • C.

      Main Processing Unit

    • D.

      Input Device

    Correct Answer
    C. Main Processing Unit
    Explanation
    The correct answer is Main Processing Unit. CPU stands for Central Processing Unit, which is the main component of a computer system responsible for executing instructions and performing calculations. It is often referred to as the "brain" of the computer as it carries out most of the processing tasks. Therefore, the CPU is known as the main processing unit.

    Rate this question:

  • 10. 

    Window is Known as 

    • A.

      Software

    • B.

      Operating System

    • C.

      Main Processing Unit

    • D.

      Input Device

    Correct Answer
    B. Operating System
    Explanation
    The correct answer is Operating System. An operating system is a software that manages computer hardware and software resources and provides common services for computer programs. It acts as an intermediary between the user and the computer hardware, allowing users to interact with the computer and run applications. It controls and coordinates the execution of other programs, manages memory and file systems, and provides a user interface. Therefore, a window is known as an operating system, not software, main processing unit, or input device.

    Rate this question:

  • 11. 

    Interpreter is known as 

    • A.

      Language Translator

    • B.

      Assembler

    • C.

      Firewall

    • D.

      Hardware

    Correct Answer
    A. Language Translator
    Explanation
    An interpreter is a program that translates high-level programming language code into machine code or executable code. It reads the code line by line and executes it immediately, translating each line into machine code as it goes. This makes the interpreter function as a language translator, converting the code into a format that the computer can understand and execute. Therefore, the correct answer is Language Translator.

    Rate this question:

  • 12. 

    What is the output from                                int n = 12;       System.out.print(goFigure(n));       System.out.print(" " + n); where the method goFigure is defined as follows:            public double goFigure(int n)       {          n = n % 7;           return (double)(12 / n);        } [Not seen before]

    • A.

      2.4 12

    • B.

      2.4 6

    • C.

      2.4 5

    • D.

      2.0 12

    • E.

      2.0 5

    Correct Answer
    D. 2.0 12
    Explanation
    (double)(12 / 5) results in 2.0 [12 / 5.0 would allow for a result of 2,.4]
    and n remains unchanged because it is passed to goFigure by value and the scope changes which n variable it is looking at.

    Rate this question:

  • 13. 

    Which statement best describes a computer program? 

    • A.

      A program can only perform one simple task.

    • B.

      A program is a sequence of comments.

    • C.

      A program can decide what task it is to perform.

    • D.

      A program is a sequence of instructions and decisions that the computer carries out.

    Correct Answer
    D. A program is a sequence of instructions and decisions that the computer carries out.
    Explanation
    A computer program is a sequence of instructions and decisions that the computer carries out. This means that a program consists of a series of steps or commands that the computer follows in order to perform a specific task. It can include instructions for calculations, data manipulation, input/output operations, and conditional statements to make decisions based on certain conditions. The program controls the flow of execution and determines what actions the computer should take at each step. It is not limited to performing a single task or just being a sequence of comments.

    Rate this question:

  • 14. 

    What translates high-level descriptions into machine code? 

    • A.

      Interpreter

    • B.

      Linker

    • C.

      Assembler

    • D.

      Compiler

    Correct Answer
    D. Compiler
    Explanation
    A compiler is a software tool that translates high-level programming language code into machine code, which is a low-level language that can be understood and executed by a computer. It takes the entire program as input and converts it into a standalone executable file or object code that can be executed directly. Unlike an interpreter, which translates and executes code line by line, a compiler performs the translation process once and generates optimized machine code, resulting in faster execution. Therefore, a compiler is the correct answer for translating high-level descriptions into machine code.

    Rate this question:

  • 15. 

    In Ch, every statement must end with this symbol. 

    • A.

      ;

    • B.

      )

    • C.

      -

    • D.

      !

    Correct Answer
    A. ;
    Explanation
    In the programming language Ch, every statement must end with a semicolon (;). This is a common convention in many programming languages, including C and its derivatives, to indicate the end of a statement. The semicolon serves as a delimiter, separating one statement from another. It helps the compiler or interpreter to understand the structure of the code and execute it correctly. Forgetting to include a semicolon at the end of a statement in Ch would result in a syntax error.

    Rate this question:

  • 16. 

    What term is used to refer to a sequence of characters enclosed in quotation marks? 

    • A.

      Comment

    • B.

      String

    • C.

      Method

    • D.

      Object

    Correct Answer
    B. String
    Explanation
    A sequence of characters enclosed in quotation marks is referred to as a string. Strings are commonly used to represent text in programming languages. They can include letters, numbers, symbols, and spaces. Strings are often used to store and manipulate textual data in computer programs.

    Rate this question:

  • 17. 

    What is a term used to describe an error detected by the compiler that is a violation of the programming language rules? 

    • A.

      Logic error

    • B.

      Typo

    • C.

      Syntax error

    • D.

      Run-time error

    Correct Answer
    C. Syntax error
    Explanation
    A syntax error is a term used to describe an error detected by the compiler that is a violation of the programming language rules. This means that the code does not follow the correct syntax or structure specified by the programming language, resulting in a compilation error. It could be caused by missing or misplaced punctuation, incorrect use of keywords or variables, or any other violation of the language's syntax rules.

    Rate this question:

  • 18. 

    What term is used to refer to a sequence of steps for solving a problem that is unambiguous, executable, and terminating? 

    • A.

      Documentation

    • B.

      Comments

    • C.

      Pseudoprogram

    • D.

      Algorithm

    Correct Answer
    D. Algorithm
    Explanation
    An algorithm is a term used to refer to a sequence of steps for solving a problem that is unambiguous, executable, and terminating. It is a set of instructions or rules that can be followed to solve a specific problem or perform a specific task. Algorithms are used in various fields such as computer science, mathematics, and problem-solving in general. They provide a systematic approach to problem-solving and ensure that the solution is clear, logical, and can be executed to completion.

    Rate this question:

  • 19. 

    Which statement about identifiers is correct? 

    • A.

      Spaces are permitted inside identifiers.

    • B.

      Identifiers are not case sensitive.

    • C.

      Identifiers can be made up of letters, digits, and the underscore (_) character.

    • D.

      Identifiers can use symbols such as ? or %.

    Correct Answer
    C. Identifiers can be made up of letters, digits, and the underscore (_) character.
    Explanation
    Identifiers are names used to identify variables, functions, classes, or any other user-defined item in programming. They must follow certain rules. The correct statement in this case is that identifiers can be made up of letters, digits, and the underscore (_) character. This means that identifiers can start with a letter or an underscore, followed by any combination of letters, digits, and underscores. Spaces are not permitted inside identifiers. Identifiers are case sensitive, meaning that uppercase and lowercase letters are considered different. Symbols such as ? or % are not allowed in identifiers.

    Rate this question:

  • 20. 

    What is the result of a % b when variables a and b are declared as follows: int a = 9; int b = 5;? 

    • A.

      1.80

    • B.

      4

    • C.

      -80

    • D.

      1

    Correct Answer
    B. 4
    Explanation
    The result of a % b when a = 9 and b = 5 is 4. The % operator calculates the remainder when a is divided by b. In this case, 9 divided by 5 equals 1 with a remainder of 4, so the result is 4.

    Rate this question:

  • 21. 

    The input to a function is called an _______________. 

    • A.

      Argument

    • B.

      Interface

    • C.

      Procedure

    • D.

      Overloaded

    Correct Answer
    A. Argument
    Explanation
    In programming, when we pass a value or a variable to a function, it is referred to as an argument. The argument is used by the function to perform certain operations or calculations. It allows us to provide input to the function and receive the desired output. Therefore, the correct answer is "argument".

    Rate this question:

  • 22. 

    The output of a method is called its __________ value. 

    • A.

      Parameter

    • B.

      Return

    • C.

      Implicit

    • D.

      Explicit

    Correct Answer
    B. Return
    Explanation
    The output of a method is commonly referred to as its "return" value. This term is used to describe the value that is returned by the method and can be accessed or used by the caller of the method.

    Rate this question:

  • 23. 

    What is the output of the following program segment?   int num = 5;   while (num >= 0)   {         num -= 2;    }   printf("%d", num); 

    • A.

      -2

    • B.

      -1

    • C.

      0

    • D.

      2

    • E.

      21

    Correct Answer
    B. -1
    Explanation
    The program segment initializes the variable "num" with a value of 5. It then enters a while loop that continues as long as "num" is greater than or equal to 0. Inside the loop, the value of "num" is decreased by 2. This process continues until "num" becomes -1, at which point the loop terminates. Finally, the program prints the value of "num", which is -1.

    Rate this question:

  • 24. 

    Which statement best describes a computer program? 

    • A.

      A program can only perform one simple task.

    • B.

      A program is a sequence of comments.

    • C.

      A program can decide what task it is to perform.

    • D.

      A program is a sequence of instructions and decisions that the computer carries out.

    Correct Answer
    D. A program is a sequence of instructions and decisions that the computer carries out.
    Explanation
    A computer program is a sequence of instructions and decisions that the computer carries out. This means that a program consists of a set of instructions that tell the computer what tasks to perform and how to perform them. The program can include different instructions and decisions that allow the computer to make choices and perform different tasks based on certain conditions. This definition highlights the dynamic and versatile nature of computer programs, as they are not limited to a single task or a sequence of comments, but rather can perform various tasks based on the instructions and decisions provided.

    Rate this question:

  • 25. 

    What translates high-level descriptions into machine code?

    • A.

      Interpreter

    • B.

      Linker

    • C.

      Assembler

    • D.

      Compiler

    Correct Answer
    D. Compiler
    Explanation
    A compiler is a software tool that translates high-level descriptions, such as code written in programming languages like C++ or Java, into machine code that can be understood and executed by a computer. Unlike an interpreter, which translates and executes code line by line, a compiler generates an executable file that can be run independently. Therefore, a compiler is the correct answer as it specifically performs the task of translating high-level descriptions into machine code.

    Rate this question:

  • 26. 

    In Ch, every statement must end with this symbol.

    • A.

      ;

    • B.

      )

    • C.

      -

    • D.

      !

    Correct Answer
    A. ;
    Explanation
    In the programming language Ch, every statement must end with a semicolon (;). This is a common convention in many programming languages, including C and its derivatives, which Ch is based on. The semicolon serves as a delimiter to separate individual statements and allows the compiler or interpreter to understand where one statement ends and the next one begins. Therefore, the correct answer is a semicolon.

    Rate this question:

  • 27. 

    What term is used to refer to a sequence of characters enclosed in quotation marks?

    • A.

      Comment

    • B.

      String

    • C.

      Method

    • D.

      Object

    Correct Answer
    B. String
    Explanation
    A "string" is the term used to refer to a sequence of characters enclosed in quotation marks. In programming, a string is a data type that represents text or characters. It can include letters, numbers, symbols, and spaces. Strings are commonly used for storing and manipulating textual data in programming languages.

    Rate this question:

  • 28. 

    What is a term used to describe an error detected by the compiler that is a violation of the programming language rules?

    • A.

      Logic error

    • B.

      Typo

    • C.

      Syntax error

    • D.

      Run-time error

    Correct Answer
    C. Syntax error
    Explanation
    A syntax error is a term used to describe an error detected by the compiler that is a violation of the programming language rules. When code is written with incorrect syntax, the compiler is unable to interpret it correctly, leading to a syntax error. This could include missing or misplaced punctuation, incorrect keywords, or incorrect variable declarations. Syntax errors are usually identified by the compiler during the compilation process and need to be fixed before the code can be executed.

    Rate this question:

  • 29. 

    What term is used to refer to a sequence of steps for solving a problem that is unambiguous, executable, and terminating?

    • A.

      Documentation

    • B.

      Comments

    • C.

      Pseudoprogram

    • D.

      Algorithm

    Correct Answer
    D. Algorithm
    Explanation
    An algorithm is a term used to refer to a sequence of steps for solving a problem that is unambiguous, executable, and terminating. It is a precise set of instructions or rules that can be followed to solve a specific problem or perform a specific task. Algorithms are used in various fields such as computer science, mathematics, and engineering to solve complex problems efficiently. They provide a systematic approach to problem-solving and ensure that the solution is reliable and consistent.

    Rate this question:

  • 30. 

    Which statement about variables is correct?

    • A.

      Spaces are permitted inside variables.

    • B.

      Identifiers are not case sensitive.

    • C.

      Variables can be made up of letters, digits, and the underscore (_) character.

    • D.

      Variables can use symbols such as ? or %.

    Correct Answer
    C. Variables can be made up of letters, digits, and the underscore (_) character.
    Explanation
    Variables in programming languages can be made up of letters, digits, and the underscore (_) character. This means that variable names can include alphabetic characters, numbers, and underscores, but cannot include spaces or symbols such as ?, %, or any other special characters. Identifiers, which include variable names, are case sensitive, meaning that uppercase and lowercase letters are considered different.

    Rate this question:

  • 31. 

    What is the result of a % b when variables a and b are declared as follows: int a = 9; int b = 5;?

    • A.

      1.80

    • B.

      4

    • C.

      -80

    • D.

      1

    Correct Answer
    B. 4
    Explanation
    The result of a % b when a = 9 and b = 5 is 4. The % operator in programming calculates the remainder when a is divided by b. In this case, 9 divided by 5 equals 1 with a remainder of 4. Therefore, the result is 4.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 13, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 03, 2016
    Quiz Created by
    Beenu_65
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.