Computer Programming 1 Fundamentals

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Themes
T
Themes
Community Contributor
Quizzes Created: 2617 | Total Attempts: 1,186,756
| Questions: 30 | Updated: Sep 8, 2026
Please wait...
Question 1 / 31
🏆 Rank #--
0 %
0/100
Score 0/100

1. Which of the following is a program that converts instructions written in low-level assembly code into relocatable machine language?

Explanation

An assembler is a specialized program that translates assembly language, a low-level programming language that is closely related to machine code, into relocatable machine language. This process involves converting mnemonic code and symbols into binary instructions that a computer's processor can execute. Unlike compilers and interpreters, which handle high-level languages, assemblers work specifically with assembly code, making them essential for low-level programming and system-level applications.

Submit
Please wait...
About This Quiz
Computer Programming 1 Fundamentals - Quiz

This assessment focuses on fundamental concepts of computer programming, particularly in Java. It evaluates knowledge on syntax, keywords, object-oriented programming, and algorithms. Understanding these core topics is essential for anyone beginning their programming journey, making this a valuable resource for learners seeking to solidify their foundational skills.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which of the following statements best describes an algorithm?

Explanation

An algorithm is fundamentally a step-by-step procedure for solving a problem or completing a task, which should be clear and understandable. Expressing it in natural language ensures that it can be easily followed by anyone, regardless of their programming knowledge. This accessibility is crucial for effective communication and collaboration, allowing individuals to grasp the logic and sequence of steps involved in the algorithm without needing to understand specific programming syntax or language.

Submit

3. It is a technique used to describe distinct steps of an algorithm that is much easier to understand for anyone with basic programming knowledge.

Explanation

Pseudocode is a method of representing an algorithm using structured but plain language that resembles programming syntax. It allows individuals with basic programming knowledge to grasp the algorithm's logic without the need for specific programming language syntax. By outlining the steps in a clear and straightforward manner, pseudocode serves as a bridge between human understanding and formal coding, making it easier to visualize and communicate complex processes.

Submit

4. Which of the following best describes the independence advantage of using Java?

Explanation

Java's independence advantage lies in its ability to run on any platform without modification, thanks to the Java Virtual Machine (JVM). This "write once, run anywhere" capability allows developers to create applications that are portable across different operating systems, enhancing flexibility and reducing development time. This feature is particularly valuable in diverse computing environments, as it eliminates the need for platform-specific adaptations, making Java a preferred choice for cross-platform application development.

Submit

5. Which of the following is not considered a requirement in naming an identifier?

Explanation

Identifiers in programming are names used to identify variables, functions, and other entities. They must adhere to specific rules, such as being case-sensitive and not using reserved words. While they can include letters, digits, underscores, and dollar signs, using reserved keywords like "true," "false," or "null" is not allowed, as these are predefined values in many programming languages. Therefore, the statement that an identifier can use true, false, or null is incorrect, as these terms are reserved and cannot be used as identifiers.

Submit

6. Which of the following statements best describes Java API?

Explanation

Java API is a comprehensive collection of pre-defined classes and methods that developers can utilize to build Java applications efficiently. It provides a wide range of functionalities, allowing programmers to leverage existing code for common tasks, thereby enhancing productivity. With thousands of classes and methods available, the Java API serves as a vital resource, enabling developers to focus on application logic rather than low-level programming details. This extensive library supports various programming needs, making it an essential component of the Java programming environment.

Submit

7. Which of the following statements best describes object-oriented programming?

Explanation

Object-oriented programming (OOP) is centered on the concept of "objects," which are instances of classes that bundle both data (attributes) and methods (functions) that operate on that data. This encapsulation allows for better organization, modularity, and reusability of code, making it easier to manage and scale software projects. By focusing on objects, OOP facilitates the modeling of real-world entities and interactions, promoting a more intuitive approach to programming compared to procedural paradigms that emphasize functions alone.

Submit

8. Which of the following is not part of the problem-solving process in the programming environment?

Explanation

Costing is not a direct part of the problem-solving process in programming, which primarily focuses on understanding the problem, designing algorithms, and executing solutions. While costing may be relevant in project management or budgeting contexts, it does not pertain to the technical steps involved in developing a solution. The core elements of problem-solving in programming include analyzing the problem, designing algorithms to address it, and executing those algorithms to find a solution.

Submit

9. Which of the following statements best defines the use of the public keyword?

Explanation

The public keyword is an access modifier in object-oriented programming that determines the visibility of classes, methods, and variables. When a member is declared as public, it can be accessed from any other code in the same program or from external programs, making it widely accessible. This contrasts with other access modifiers like private or protected, which restrict access. By defining a member as public, developers can create APIs or interfaces that allow other parts of the program or other programs to interact with that member freely.

Submit

10. Which of the following statements best defines the use of the void keyword?

Explanation

The void keyword in programming indicates that a method does not return a value. In the context of the main method, it signifies that after executing the method, there is no data being sent back to the caller. This is essential for methods that perform actions without needing to provide a result, allowing them to focus on executing tasks rather than producing output. Thus, using void clarifies the method's purpose and behavior within the program.

Submit

11. Which of the following is the correct syntax for a single-line comment in Java?

Explanation

In Java, single-line comments are denoted by the double forward slash `//`. Everything following `//` on that line is treated as a comment and is ignored by the compiler. This syntax allows developers to add notes or explanations within the code without affecting its execution. The other options listed are not valid for single-line comments in Java: `/* ... */` is used for multi-line comments, `#` is used in scripting languages like Python, and `` is for HTML comments.

Submit

12. Which type of programming language is closer to machine code and hardware, providing programmers with direct control over computer hardware and resources?

Explanation

Low-level languages, such as assembly and machine code, provide a minimal abstraction from the hardware, allowing programmers to manipulate memory and CPU instructions directly. This proximity to machine code enables fine-tuned control over system resources, making them ideal for performance-critical applications. In contrast, high-level languages abstract these details, sacrificing some control for ease of use and readability. Therefore, low-level languages are essential for tasks requiring direct hardware interaction.

Submit

13. It converts the source code into a binary program of bytecode.

Explanation

The Java Compiler is responsible for translating the human-readable source code written in Java into bytecode, which is a binary format that can be executed by the Java Virtual Machine (JVM). This process allows Java programs to be platform-independent, as the bytecode can run on any system with a compatible JVM, making it a crucial step in Java's "write once, run anywhere" philosophy.

Submit

14. Which of the following is a valid Java identifier based on the rules for naming identifiers?

Explanation

In Java, identifiers must begin with a letter, underscore (_), or dollar sign ($) and can be followed by letters, digits, underscores, or dollar signs. "student_name" adheres to these rules as it starts with a letter and contains only valid characters. In contrast, "2studentName" starts with a digit, "student name" contains a space, and "true" is a reserved keyword, making them invalid identifiers. Thus, "student_name" is the only valid option.

Submit

15. What refers to the set of rules that defines the combinations and arrangements of symbols or characters needed to create a valid statement in a programming language?

Explanation

Syntax refers to the structure and arrangement of symbols and characters in a programming language. It establishes the rules that dictate how statements must be formed to be understood by the compiler or interpreter. Just as grammar governs the construction of sentences in natural languages, syntax ensures that code is organized correctly, enabling it to execute without errors. Understanding syntax is crucial for writing valid code and for effective communication with programming languages.

Submit

16. Which programming language is described as a free-to-use, highly dynamic, and high-level language used for web applications, mobile applications, enterprise software, big data applications, and server-side technologies?

Explanation

not-available-via-ai

Submit

17. It is the name given to a program component such as class, object, or variable.

Explanation

An identifier is a name used to identify a program component, such as a class, object, or variable, within code. It allows programmers to reference these components in a meaningful way, making the code more understandable and maintainable. Identifiers must follow specific naming conventions and rules defined by the programming language, such as not starting with a digit and avoiding reserved keywords. By using identifiers, developers can create clear and organized code, facilitating collaboration and reducing errors.

Submit

18. Which Java component includes the complete JRE and provides tools for developing, debugging, and monitoring Java applications?

Explanation

The Java Development Kit (JDK) is a comprehensive package that includes the Java Runtime Environment (JRE), which is necessary for running Java applications, as well as development tools such as compilers and debuggers. This makes the JDK essential for developers who need to create, debug, and monitor Java applications, providing everything required to build and manage Java software effectively.

Submit

19. Which of the following refers to a series of characters that appear exactly as written and is enclosed by double quotation marks?

Explanation

A literal string is a sequence of characters that is explicitly defined in code, typically enclosed in double quotation marks. This allows the programming language to interpret the enclosed characters as a fixed value rather than a variable or expression. For example, in many programming languages, writing "Hello, World!" creates a literal string that represents that exact text. This concept is fundamental in programming for defining text values that can be manipulated or displayed.

Submit

20. This is stored on a disk with a .java file extension.

Explanation

A .java file extension indicates that the file contains Java source code, which is the human-readable code written by programmers. This source code is then compiled into bytecode by the Java compiler, which can be executed by the Java Virtual Machine (JVM). Unlike bytecode, which is an intermediate representation, source code is the original form of the program before any compilation occurs. Therefore, identifying a .java file as source code is accurate and reflects its role in the Java programming process.

Submit

21. It is a program that directly executes instructions in a high-level language without converting into a machine language.

Explanation

An interpreter is a program that executes high-level language instructions directly, translating them into machine code on-the-fly, rather than converting the entire program at once like a compiler. This allows for immediate execution and testing of code, making it ideal for scripting and rapid development. Unlike compilers, which produce a standalone executable, interpreters process code line by line, facilitating easier debugging and interactive coding sessions.

Submit

22. It is a pictorial representation that can be used as a substitute for an algorithm.

Explanation

A flowchart visually represents a process or algorithm using symbols and arrows to illustrate the flow of control and data. It provides a clear and concise way to depict the steps involved, making it easier to understand complex processes. Unlike pseudocode, which uses textual descriptions, flowcharts rely on graphical elements, making them more accessible for visual learners. This pictorial representation effectively communicates the sequence of actions and decisions in a structured manner, serving as a useful substitute for traditional algorithmic notation.

Submit

23. What are pre-written Java programs that provide existing functionality, such as getting the time and date, performing mathematical operations, and manipulating text?

Explanation

Java APIs are pre-written libraries that offer a set of functions and tools for developers to utilize in their applications. They simplify the process of programming by providing ready-made solutions for common tasks, such as retrieving the current time, performing calculations, and handling string manipulation. By using Java APIs, developers can save time and effort, allowing them to focus on building unique features rather than reinventing basic functionalities.

Submit

24. Which of the following refers to the virtual machine that runs Java applications as a run-time engine?

Explanation

Java Virtual Machine (JVM) is an essential component of the Java platform that enables the execution of Java applications. It acts as an intermediary between Java bytecode and the underlying hardware, allowing Java programs to run on any device or operating system that has a JVM installed. This platform independence is a key feature of Java, making it versatile for developers. In contrast, the JDK is a development toolkit, the JRE provides the libraries and components needed to run Java applications but does not include development tools, and the Java Compiler translates source code into bytecode.

Submit

25. It is a set of steps that generates a finite sequence of simple computational operations leading to the solution of a given problem.

Explanation

An algorithm is a systematic procedure that outlines a series of steps to solve a specific problem. It consists of a finite sequence of well-defined instructions or operations that lead to the desired outcome. Algorithms are fundamental in computer science and mathematics, as they provide a clear methodology for problem-solving, ensuring consistency and efficiency in execution.

Submit

26. This company created the Java programming language in 1995.

Explanation

Sun Microsystems developed the Java programming language in 1995 as part of its initiative to create a platform-independent programming environment. Java's design emphasized portability, allowing applications to run on any device that supports the Java Virtual Machine (JVM), which led to the popular phrase "Write Once, Run Anywhere" (WORA). This innovation made Java a cornerstone in software development, particularly for web applications and enterprise solutions, establishing Sun Microsystems as a key player in the tech industry during that era.

Submit

27. What Java feature allows Java code to be written once and run on different platforms without rewriting the code?

Explanation

Write Once, Run Anywhere (WORA) is a key feature of Java that enables developers to write code once and execute it on any platform that supports the Java Virtual Machine (JVM). This is achieved through the use of bytecode, which is platform-independent and can be interpreted by the JVM on different operating systems. This flexibility eliminates the need for platform-specific code modifications, making Java a highly portable programming language.

Submit

28. It is considered the basic unit of a Java program.

Explanation

In Java, a class serves as the fundamental building block of a program. It acts as a blueprint for creating objects, encapsulating data and behavior. Each class can contain fields (attributes) and methods (functions) that define the properties and actions of the objects created from it. The structure of a Java program revolves around classes, as they define the types of objects that can exist and how they interact, making them essential for object-oriented programming in Java.

Submit

29. Which of the following cannot start an identifier name?

Explanation

In programming, an identifier name must begin with a letter (either uppercase or lowercase) or an underscore. Starting an identifier with a digit is not allowed because it could lead to confusion with numeric literals. Identifiers are used to name variables, functions, and other entities, and adhering to these rules ensures clarity and consistency in the code. Therefore, a digit cannot serve as the starting character for an identifier name.

Submit

30. It is the unique instruction given to a computer application to perform a task.

Explanation

A command is a specific instruction that tells a computer application to execute a particular task. It acts as a directive, guiding the application on what operation to perform, such as opening a file, saving data, or running a program. Unlike syntax, which refers to the structure of commands, or libraries and comments, which serve different purposes in programming, a command is the actionable element that directly triggers a function within the software.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (30)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following is a program that converts instructions written...
Which of the following statements best describes an algorithm?
It is a technique used to describe distinct steps of an algorithm that...
Which of the following best describes the independence advantage of...
Which of the following is not considered a requirement in naming an...
Which of the following statements best describes Java API?
Which of the following statements best describes object-oriented...
Which of the following is not part of the problem-solving process in...
Which of the following statements best defines the use of the public...
Which of the following statements best defines the use of the void...
Which of the following is the correct syntax for a single-line comment...
Which type of programming language is closer to machine code and...
It converts the source code into a binary program of bytecode.
Which of the following is a valid Java identifier based on the rules...
What refers to the set of rules that defines the combinations and...
Which programming language is described as a free-to-use, highly...
It is the name given to a program component such as class, object, or...
Which Java component includes the complete JRE and provides tools for...
Which of the following refers to a series of characters that appear...
This is stored on a disk with a .java file extension.
It is a program that directly executes instructions in a high-level...
It is a pictorial representation that can be used as a substitute for...
What are pre-written Java programs that provide existing...
Which of the following refers to the virtual machine that runs Java...
It is a set of steps that generates a finite sequence of simple...
This company created the Java programming language in 1995.
What Java feature allows Java code to be written once and run on...
It is considered the basic unit of a Java program.
Which of the following cannot start an identifier name?
It is the unique instruction given to a computer application to...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!