SQL Test: Trivia Quiz Questions!

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 Rajkumar_2011
R
Rajkumar_2011
Community Contributor
Quizzes Created: 3 | Total Attempts: 3,044
Questions: 20 | Attempts: 951

SettingsSettingsSettings
SQL Test: Trivia Quiz Questions! - Quiz

.


Questions and Answers
  • 1. 

    A pointer is

    • A.

      A keyword used to create variables

    • B.

      A variable that stores address of an instruction

    • C.

      A variable that stores address of other variable

    • D.

      All of the above

    Correct Answer
    C. A variable that stores address of other variable
    Explanation
    A pointer is a variable that stores the memory address of another variable. It allows direct access and manipulation of the data stored at that memory location. Pointers are used to create more efficient and flexible code by enabling the passing of memory addresses as arguments, allowing functions to modify variables in the calling scope, and facilitating dynamic memory allocation. Therefore, the correct answer is "A variable that stores the address of another variable."

    Rate this question:

  • 2. 

    A page fault occurs when:

    • A.

      The page is corrupted by application software

    • B.

      The page is in main memory

    • C.

      The page is not in main memory

    • D.

      One tries to divide a number by 0

    Correct Answer
    C. The page is not in main memory
    Explanation
    A page fault occurs when the page being requested by the CPU is not currently present in the main memory. This means that the required page has been swapped out to secondary storage, such as the hard disk, due to memory management techniques like paging or swapping. When a page fault occurs, the operating system needs to retrieve the requested page from secondary storage and load it into the main memory before the CPU can access it.

    Rate this question:

  • 3. 

    The keyword used to transfer control from a function back to the calling function is

    • A.

      Switch

    • B.

      Goto

    • C.

      Go back

    • D.

      Return

    Correct Answer
    D. Return
    Explanation
    The keyword used to transfer control from a function back to the calling function is "return". This keyword is used in programming languages to exit a function and return a value, if any, to the calling function. It allows the program to continue executing from the point where the function was called.

    Rate this question:

  • 4. 

    Specify the 2 library functions to allocate memory dynamically?     

    • A.

      Malloc() and memalloc()

    • B.

      Alloc() and memalloc()

    • C.

      Malloc() and calloc()

    • D.

      Memalloc() and faralloc()

    Correct Answer
    C. Malloc() and calloc()
    Explanation
    The correct answer is malloc() and calloc(). These two library functions are used to allocate memory dynamically in C programming. malloc() is used to allocate a block of memory of a specified size, while calloc() is used to allocate a block of memory for an array of elements, initializing all the bytes to zero.

    Rate this question:

  • 5. 

    System calls are invoked by using:

    • A.

      Software interrupts

    • B.

      Polling

    • C.

      Indirect jump

    • D.

      A privileged instruction

    Correct Answer
    A. Software interrupts
    Explanation
    System calls are invoked by using software interrupts. When a program needs to perform a privileged operation or access a resource outside its scope, it triggers a software interrupt to transfer control to the operating system. The operating system then handles the request and returns the result to the program. Software interrupts provide a safe and controlled mechanism for user programs to interact with the operating system, ensuring that only authorized operations are performed. This method allows for efficient and secure communication between user programs and the operating system.

    Rate this question:

  • 6. 

    What is a shell?

    • A.

      It is a hardware component

    • B.

      It is a command interpreter

    • C.

      It is a part in compiler

    • D.

      It is a tool in CPU scheduling

    Correct Answer
    B. It is a command interpreter
    Explanation
    A shell is a command interpreter that allows users to interact with the operating system by executing commands. It provides a user-friendly interface for users to input commands and receive outputs from the system. The shell interprets these commands and communicates with the operating system to perform various tasks. It is not a hardware component, part in compiler, or tool in CPU scheduling.

    Rate this question:

  • 7. 

    Unix Operating System is an __________.

    • A.

      Time Sharing Operating System

    • B.

      Multi-User Operating System

    • C.

      Multi-tasking Operating System

    • D.

      All the Above

    Correct Answer
    D. All the Above
    Explanation
    The correct answer is "All the Above" because Unix Operating System is a Time Sharing Operating System, which allows multiple users to access the system simultaneously. It is also a Multi-User Operating System, as it supports multiple users to have separate accounts and access privileges. Additionally, Unix is a Multi-tasking Operating System, meaning it can execute multiple tasks concurrently, allowing users to run multiple programs at the same time. Therefore, all the given options accurately describe Unix Operating System.

    Rate this question:

  • 8. 

    Which of the following cannot be checked in a switch-case statement?      

    • A.

      Character

    • B.

      Integer

    • C.

      Float

    • D.

      Enum

    Correct Answer
    C. Float
    Explanation
    A switch-case statement cannot check for a float value because it only supports checking for discrete values, such as integers or characters. Float values are continuous and can have infinite possible values, making it impractical to check for them using a switch-case statement.

    Rate this question:

  • 9. 

    The primary job of the operating system of a computer is to ________.

    • A.

      Command Resources

    • B.

      Manage Resources

    • C.

      Provide Utilities

    • D.

      Be user friendly

    Correct Answer
    B. Manage Resources
    Explanation
    The primary job of the operating system of a computer is to manage resources. This includes allocating and scheduling resources such as memory, processing power, and input/output devices to different programs and users. The operating system ensures that these resources are used efficiently and effectively, preventing conflicts and maximizing system performance. Additionally, the operating system manages access to resources, enforcing security measures and providing a controlled environment for users and applications to interact with the hardware.

    Rate this question:

  • 10. 

    Does there any function exist to convert the int or float to a string?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Yes, there are functions in most programming languages that allow you to convert an integer or float to a string. These functions are commonly used when you need to display numerical values as text or when you want to concatenate numbers with other strings. The specific function names may vary depending on the programming language you are using, but they generally provide a straightforward way to convert numerical values to string representations.

    Rate this question:

  • 11. 

    CPU performance is measured through ________.

    • A.

      Throughput

    • B.

      MHz

    • C.

      Flaps

    • D.

      None of the above

    Correct Answer
    A. Throughput
    Explanation
    CPU performance is measured through throughput. Throughput refers to the amount of work or data that can be processed by the CPU within a given time period. It indicates the efficiency and speed at which the CPU can perform tasks. A higher throughput value indicates better CPU performance, as it means the CPU can handle more tasks or process more data in a given amount of time. MHz, on the other hand, refers to the clock speed of the CPU and is not a direct measure of performance. Flaps is not a relevant term in the context of CPU performance measurement.

    Rate this question:

  • 12. 

    How would you round off a value from 1.66 to 2.0?

    • A.

      Ceil(1.66)

    • B.

      Floor(1.66)

    • C.

      Roundup(1.66)

    • D.

      Roundto(1.66)

    Correct Answer
    A. Ceil(1.66)
    Explanation
    The function ceil(1.66) is used to round up a value to the nearest integer. In this case, 1.66 is rounded up to 2.0.

    Rate this question:

  • 13. 

    Which one of the following is not a feature of c?

    • A.

      Structures

    • B.

      Pointers

    • C.

      Unions

    • D.

      Inheritance

    Correct Answer
    D. Inheritance
    Explanation
    Inheritance is not a feature of the C programming language. Inheritance is a concept in object-oriented programming where a class can inherit properties and behavior from another class. However, C is a procedural programming language and does not support inheritance. It is mainly used for low-level programming and does not have built-in support for object-oriented features like inheritance.

    Rate this question:

  • 14. 

    Which one among the following is not a storage class?

    • A.

      Auto

    • B.

      Extern

    • C.

      Register

    • D.

      Global

    Correct Answer
    D. Global
    Explanation
    The storage classes in C programming language are auto, extern, and register. These storage classes are used to define the scope and lifetime of variables. However, "global" is not a storage class in C. It refers to variables that are declared outside of any function and have global scope, meaning they can be accessed from any part of the program.

    Rate this question:

  • 15. 

    You can add a row using SQL in a database with which of the following?

    • A.

      ADD

    • B.

      CREATE

    • C.

      INSERT

    • D.

      MAKE

    Correct Answer
    C. INSERT
    Explanation
    The correct answer is INSERT because the INSERT statement in SQL is used to add a new row or record into a table in a database. It allows you to specify the values for each column in the new row, or you can also insert data from another table. The ADD, CREATE, and MAKE statements are not used to add a new row to a table in SQL.

    Rate this question:

  • 16. 

    The command to remove rows from a table 'CUSTOMER' is:

    • A.

      REMOVE FROM CUSTOMER ...

    • B.

      DROP FROM CUSTOMER ...

    • C.

      DELETE FROM CUSTOMER WHERE ...

    • D.

      UPDATE FROM CUSTOMER ...

    Correct Answer
    C. DELETE FROM CUSTOMER WHERE ...
    Explanation
    The correct answer is "DELETE FROM CUSTOMER WHERE ...". This command is used to remove rows from a table called "CUSTOMER" based on specified conditions. The "WHERE" clause allows you to specify the conditions that the rows must meet in order to be deleted. This command is commonly used in SQL to delete specific rows from a table.

    Rate this question:

  • 17. 

    The command to eliminate a table from a database is:

    • A.

      REMOVE TABLE CUSTOMER;

    • B.

      DROP TABLE CUSTOMER;

    • C.

      DELETE TABLE CUSTOMER;

    • D.

      UPDATE TABLE CUSTOMER;

    Correct Answer
    B. DROP TABLE CUSTOMER;
    Explanation
    The correct answer is DROP TABLE CUSTOMER. This command is used to delete or remove a table from a database. The other options (REMOVE TABLE CUSTOMER, DELETE TABLE CUSTOMER, UPDATE TABLE CUSTOMER) are not valid SQL commands for removing a table.

    Rate this question:

  • 18. 

    The DROP TABLE statement:

    • A.

      Deletes the table structure only.

    • B.

      Deletes the table structure along with the table data.

    • C.

      Works whether or not referential integrity constraints would be violated.

    • D.

      It is not an SQL statement.

    Correct Answer
    B. Deletes the table structure along with the table data.
    Explanation
    The DROP TABLE statement is used to delete a table from a database. It not only deletes the table structure but also removes all the data stored in that table. This means that all the rows and columns of the table are permanently removed from the database. This statement is commonly used when a table is no longer needed or when it needs to be recreated with a different structure.

    Rate this question:

  • 19. 

    Which of the following is NOT a type of SQL constraint?

    • A.

      PRIMARY KEY

    • B.

      FOREIGN KEY

    • C.

      ALTERNATE KEY

    • D.

      UNIQUE

    Correct Answer
    C. ALTERNATE KEY
    Explanation
    An alternate key is not a type of SQL constraint. SQL constraints are used to enforce rules and restrictions on the data stored in a database. The PRIMARY KEY constraint ensures that each record in a table is unique and identifies the primary key for that table. The FOREIGN KEY constraint establishes a link between two tables based on a key from one table that references the primary key of another table. The UNIQUE constraint ensures that each value in a column is unique. However, an alternate key is not a recognized type of constraint in SQL.

    Rate this question:

  • 20. 

    Which one of the following sorts of rows in SQL?

    • A.

      SORT BY

    • B.

      ALIGN BY

    • C.

      ORDER BY

    • D.

      GROUP BY

    Correct Answer
    C. ORDER BY
    Explanation
    ORDER BY is used in SQL to sort the result set of a query in ascending or descending order based on one or more columns. It is used to organize the data in a specific order, allowing users to easily analyze and retrieve information. The other options mentioned in the question (SORT BY, ALIGN BY, GROUP BY) are not valid SQL keywords for sorting rows.

    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
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 06, 2011
    Quiz Created by
    Rajkumar_2011

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.