Self Studies

Computer Science Test - 21

Result Self Studies

Computer Science Test - 21
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    5 / -1

    Assertion (A): When a file is opened in read mode (< r >), the file offset position is set to the end of the file.

    Reason (R): The primary purpose of read mode is to start reading from the existing end of the file content.

    Choose the most appropriate option:

    Solution

    The correct answer is (A) is false, (R) is false.

    Key Points

    • Assertion (A) is INCORRECT. When a file is opened in read mode (< r >), the file offset position is set to the beginning of the file, not the end.
    • Reason (R) is INCORRECT. The main purpose of read mode is to access and read existing content from the start of the file, not necessarily to begin reading from the end.
  • Question 2
    5 / -1

    Which of the following statements is/are correct for variable names in python language?

    Solution

    A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume)

  • Question 3
    5 / -1

    Match List I and List II.

    Solution

    (A) MQTT is a lightweight, publish-subscribe protocol that is ideal for low-bandwidth, high-latency networks, making it well-suited for IoT devices that operate in remote areas with limited connectivity.

    (B) CoAP is a lightweight protocol designed for constrained devices and low-power networks, making it well-suited for IoT devices that operate on battery power or have limited processing capabilities.

    (C) HTTP is a popular protocol used for web-based communication, but it is not as well-suited for IoT devices due to its high overhead and lack of support for low-power networks.

    (D) LoRaWAN is a long-range, low-power protocol designed for IoT devices that need to communicate over long distances, making it well-suited for applications like smart agriculture or asset tracking.

  • Question 4
    5 / -1

    Which of the following provides a command for defining relation schema?

    Solution

    Data Definition Language: The SQL DDL provides commands for defining relation schemas, deleting relations, and modifying relation schemas.

  • Question 5
    5 / -1

    In RDBMS, data is presented as a collection of ______.

    Solution

    In relational model, data is stored in relations (tables) and is represented in form of tuples (rows). RDBMS is used to manage relational database. Relational database is a collection of organized set of tables related to each other, and from which data can be accessed easily.

  • Question 6
    5 / -1

    Structured Query Language (SQL) is used to

    Solution
    • In a DBMS, the SQL database language is used to:
    • Create the database and table structures
    • Perform basic data management chores (add, delete and modify)
    • Perform complex queries to transform raw data into useful information
  • Question 7
    5 / -1

    Match the contents under List I with those under List II.

    Solution
    • A subquery is a query that is nested inside another query and is used to retrieve data to be used in the main query.
    • A 'Common Table Expression' (CTE) is a named temporary result set that can be used within a query. It is similar to a subquery but is declared separately and can be referenced multiple times within the same query.
    • A window function is a function that performs a calculation across a set of rows that are related to the current row. It is used to calculate values such as running totals or moving averages.
    • A materialized view is a physical copy of a query result that can be stored and queried later. It is used to improve performance by precomputing expensive queries.
  • Question 8
    5 / -1

    Two statements are given below:

    Statement I: Bubble Sort has a worst-case time complexity of O(n2), making it inefficient for large collections.

    Statement II: Merge Sort has a worst-case time complexity of O(n log n), making it efficient for large collections.

    Solution

    Bubble sort is a simple sorting algorithm that compares adjacent elements and swaps them if they are in the wrong order. It has a worst-case time complexity of O(n2) for both comparisons and swaps, making it inefficient for large collections. Merge sort is a divide-and-conquer sorting algorithm that works by dividing the collection into smaller subcollections, sorting them recursively, and then merging the sorted subcollections to produce the final sorted collection. It has a worst-case time complexity of O(n log n) for both comparisons and swaps, making it efficient for large collections.

  • Question 9
    5 / -1

    How many times can a loop in while(0) run?

    Solution

    while(0) - It is opposite of while(1). It means condition will always be false and ,thus, the code in 'while' will never get executed.

  • Question 10
    5 / -1

    Python strings are also called the collection of:

    Solution

    Each character is encoded in the ASCII or Unicode character. So, we can say that Python strings are also called the collection of Unicode characters. In Python, strings can be created by enclosing the character or the sequence of characters in the quotes.

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now