1.
A pointer is
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."
2.
A page fault occurs when:
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.
3.
The keyword used to transfer control from a function back to the calling function is
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.
4.
Specify the 2 library functions to allocate memory dynamically?
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.
5.
System calls are invoked by using:
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.
6.
What is a shell?
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.
7.
Unix Operating System is an __________.
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.
8.
Which of the following cannot be checked in a switch-case statement?
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.
9.
The primary job of the operating system of a computer is to ________.
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.
10.
Does there any function exist to convert the int or float to a string?
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.
11.
CPU performance is measured through ________.
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.
12.
How would you round off a value from 1.66 to 2.0?
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.
13.
Which one of the following is not a feature of c?
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.
14.
Which one among the following is not a storage class?
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.
15.
You can add a row using SQL in a database with which of the following?
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.
16.
The command to remove rows from a table 'CUSTOMER' is:
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.
17.
The command to eliminate a table from a database is:
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.
18.
The DROP TABLE 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.
19.
Which of the following is NOT a type of SQL constraint?
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.
20.
Which one of the following sorts of rows in SQL?
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.