Technical Questions

Q:

What is a deadlock?

Answer

Deadlock is a situation where a group of processes are all blocked and none of them can become unblocked until one of the other becomes unblocked. The simplest deadlock is two processes each of which is waiting for a message from the other.

Report Error

View answer Workspace Report Error Discuss

1 1595
Q:

Point out the error, if any, in the following program.

main()

{

    int i = 4, j = 2;

    switch(i)

    {

     case 1 :

       printf (''\n To err is human, to forgive is against company policy.");

        break;

      case j :

       printf (''\n if you have nothing to do, don't do it here.");

       break;

    }

}

Answer

Constant expression required in the second case, we cannot use j.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 1589
Q:

What is an operating system?

Answer

 


An operating system is a program that acts as an intermediary between the user and the computer hardware. The purpose of an OS is to provide a convenient environment in which user can execute programs in a convenient and efficient manner. It is a resource allocator responsible for allocating system resources and a control program which controls the operation of the computer hardware.

Report Error

View answer Workspace Report Error Discuss

2 1589
Q:

Write a c program to check whether a number is strong or not.

Answer

#include<stdio.h>
int main(){
  int num,i,f,r,sum=0,temp;

  printf("Enter a number: ");
  scanf("%d",&num);
 
  temp=num;
  while(num){
      i=1,f=1;
      r=num%10;

      while(i<=r){
         f=f*i;
        i++;
      }
      sum=sum+f;
      num=num/10;
  }
  if(sum==temp)
      printf("%d is a strong number",temp);
  else
      printf("%d is not a strong number",temp);

  return 0;
}

Sample output:
Enter a number: 145
145 is a strong number

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 1588
Q:

What are java threads?

Answer

Java is one of the small number of languages that support at the language level for the creation and management of threads. However, because threads are managed by the java virtual machine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads as either user- or kernel-level.

Report Error

View answer Workspace Report Error Discuss

1 1586
Q:

what are the various flags used in 8085?

Answer

Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 1584
Q:

What are deadlock prevention techniques?

Answer

Mutual exclusion


Hold and wait


No preemption


Circular wait

Report Error

View answer Workspace Report Error Discuss

0 1583
Q:

What is a ready queue?

Answer

The processes that are residing in the main memory and are ready and waiting to execute are kept on a list called the ready queue.

Report Error

View answer Workspace Report Error Discuss

0 1582