Technical Questions

Q:

Why we use do-while loop in c?

Answer

It is also called as post tested loop. It is used when it is necessary to execute the loop at least one time. Syntax:

do {
Loop body
} while (Expression);

Example:

int main(){
    int num,i=0;  
    do{
         printf("To enter press 1\n");
         printf("To exit press  2");
         scanf("%d",&num);
         ++i;
         switch(num){
             case 1:printf("You are welcome\n");break;
             default : exit(0);
         }
    }
    while(i<=10);
    return 0;
}

Output: 3 3 4 4

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2011
Q:

What is process synchronization?

Answer

A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition. To guard against the race condition we need to ensure that only one process at a time can be manipulating the same data. The technique we use for this is called process synchronization.

Report Error

View answer Workspace Report Error Discuss

1 2010
Q:

Where's MBR located on the disk?

Answer

Main Boot Record is located is sector 0, track 0, head 0, cylinder 0 of the primary active partition.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2009
Q:

Which error are you likely to get when you run the following program?

main()

{

  struct emp

  {

      char name[20];

      float sal;

  };

  struct emp e[10];

  int i;

  for ( i = 0 ; i <= 9; i++)

        scanf ( "%s %f" , e[i].name, &e[i].sal );

}

Answer

Floating point formats not linked

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2006
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 2000
Q:

Define HCMOS?

Answer

High-density n-type Complimentary Metal Oxide Silicon field effect transistor.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 1995
Q:

What are system calls?

Answer

System calls provide the interface between a process and the operating system. System calls for modern Microsoft windows platforms are part of the win32 API, which is available for all the compilers written for Microsoft windows.

Report Error

View answer Workspace Report Error Discuss

1 1992
Q:

What are the blocking and non-blocking assignments in Verilog and which is preferred in Sequential Circutis?

Answer

A blocking assignment is one in which the statements are executed sequentially, i.e., first statement is executed and variable is assigned  a value then second is executed and so on. A non blocking assignment is  one in which statements occurs conturrently, only non blocking assignments should be used in sequential circuit.


 


e.g.


initial


begin


a=b; //blocking


c<=a; //nonblocking


d=c; // blocking


end


 


In this example firstly the value of b is assigned to a and this value is assigned to c only after execution of first statement. the second and the third statements are executed simultaneously, i.e. value a ais assigned to c and previous value if c is assigned to d.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 1991