1.
Which of the following condition is required for a deadlock to be possible?
Correct Answer
D. All of the mentioned
Explanation
A deadlock occurs when multiple processes are unable to proceed because each is waiting for a resource that is held by another process. In order for a deadlock to be possible, all of the mentioned conditions must be present. Mutual exclusion means that only one process can access a resource at a time, so if a process is holding a resource, it cannot be accessed by another process. A process may hold allocated resources while waiting for other resources, creating a situation where multiple processes are waiting for resources that are held by other processes. Finally, no resource can be forcibly removed from a process holding it, meaning that a process cannot be interrupted or have its resources taken away by another process.
2.
What is the value of ceil(15.2)?
Correct Answer
B. 16
Explanation
The ceil() function returns the smallest integer that is greater than or equal to a given number. In this case, the given number is 15.2. Since 16 is the smallest integer that is greater than or equal to 15.2, the value of ceil(15.2) is 16.
3.
Who is known as the father of C Language ?
Correct Answer
Dennis Ritchie, dennis ritchie, DennisRitchie, dennisritchie
Explanation
Dennis Ritchie is known as the father of the C Language. He was the creator of the C programming language and played a significant role in the development of Unix operating system. C language has been widely used and has greatly influenced the development of many other programming languages.
4.
Which of the following is a type of computer storage containing non-volatile, permanent data that, normally, can only be read, not written to?
Correct Answer
B. ROM
Explanation
ROM stands for Read-Only Memory. It is a type of computer storage that contains non-volatile, permanent data. The data stored in ROM cannot be modified or written to by the user. It is typically used to store firmware or software instructions that are essential for the computer to boot up and perform basic functions. Unlike RAM (Random Access Memory), which is volatile and temporary, ROM retains its data even when the computer is powered off. HDD (Hard Disk Drive) and SSD (Solid State Drive) are types of secondary storage devices that can be written to and modified by the user.
5.
The ______________ is the step by step instructions written to solve any problem.
Correct Answer
B. Algorithm
Explanation
An algorithm is a set of step-by-step instructions that are written to solve a problem. It provides a clear and systematic approach to problem-solving and is used in various fields, including computer science, mathematics, and engineering. Algorithms are designed to be precise and unambiguous, allowing anyone to follow them and achieve the desired outcome. They serve as a blueprint for solving problems efficiently and effectively.
6.
Maximum number of elements in the given array declaration is:
int a[5][3];
Correct Answer
D. 15
Explanation
The maximum number of elements in the given array declaration is 15 because the array is declared as int a[5][3], which means it has 5 rows and 3 columns. Therefore, the total number of elements in the array is 5 * 3 = 15.
7.
Which of the following statement is used to skip the current iteration and starts with the next iteration?
Correct Answer
B. Continue
Explanation
The statement "continue" is used to skip the current iteration in a loop and move on to the next iteration. It is typically used within a loop structure to bypass the remaining code in the current iteration and start with the next iteration. This allows for selective execution of code within a loop based on certain conditions.
8.
The compiler converts the programs written in assembly language into machine language.
Correct Answer
B. False
Explanation
The statement is false because the compiler does not convert programs written in assembly language into machine language. Instead, the assembler is responsible for translating assembly language code into machine language instructions. The compiler, on the other hand, translates high-level programming languages into machine code.
9.
A system is in the safe state if ____________
Correct Answer
A. The system can allocate resources to each process in some order and still avoid a deadlock
Explanation
A system is in the safe state if it can allocate resources to each process in some order and still avoid a deadlock. This means that the system has enough resources available to satisfy the resource requests of all processes and can allocate them in a way that ensures no deadlock will occur. In other words, the system is able to manage its resources effectively and prevent any process from being indefinitely blocked from accessing the resources it needs. This ensures the smooth execution of processes without the risk of deadlock.