Technical Questions

Q:

List out some reasons for process termination.

Answer

- Normal completion


- Time limit exceeded


- Memory unavailable


- Bounds violation


- Protection error


- Arithmetic error


- Time overrun


- I/O failure


- Invalid instruction


- Privileged instruction


- Data misuse


- Operator or OS intervention


- Parent termination.

Report Error

View answer Workspace Report Error Discuss

22 16389
Q:

What resources are used when a thread is created? How do they differ from those when a process is created?

Answer

When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads.

Report Error

View answer Workspace Report Error Discuss

19 16212
Q:

How many times i value is checked in the below code?

       #include <stdio.h>
        int main()
        {
            int i = 0;
            do {
                i++;
                printf( "In while loopn" );
            } while (i < 3);
        }

A) 2 B) 3
C) 4 D) 1
 
Answer & Explanation Answer: B) 3

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Programming

5 15786
Q:

What will be output when you will execute following c code?

#include <stdio.h>
void main()

{
    int const SIZE = 5;
    int expr;
    double value[SIZE] = { 2.0, 4.0, 6.0, 8.0, 10.0 };
    expr=1|2|3|4;
    printf ( "%f", value[expr] );
}

A) 2.000000 B) 4.000000
C) 8.000000 D) Compilation error
 
Answer & Explanation Answer: D) Compilation error

Explanation:

Size of any array in c cannot be constantan variable.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

5 15778
Q:

Unreachable code would best be found using

A) code inspections B) a static analysis tool
C) code reviews D) a test management tool
 
Answer & Explanation Answer: C) code reviews

Explanation:

Code review is a software quality assurance activity in which one or several humans check a program mainly by viewing and reading parts of its source code, and they do so after implementation or as an interruption of implementation.

Report Error

View Answer Report Error Discuss

14 15617
Q:

Physical or logical arrangement of network is

A) Topology B) Routing
C) Both A & B D) Networking
 
Answer & Explanation Answer: A) Topology

Explanation:

The logical arrangement of the nodes of different networks to communicate is called as topology.

Report Error

View Answer Report Error Discuss

23 15211
Q:

Statement coverage will not check for the following

A) Dead Code B) Unused Statement
C) Missing Statements D) Unused Branches
 
Answer & Explanation Answer: C) Missing Statements

Explanation:

Statement coverage is a white box test design technique which involves execution of all the executable statements in the source code at least once. It is used to calculate and measure the number of statements in the source code which can be executed given the requirements.

Report Error

View Answer Report Error Discuss

7 15156
Q:

What is the output of this C code?

       #include <stdio.h>
        void main()
        {
            int x = 1, z = 3;
            int y = x << 3;
            printf( "%dn", y );
        }

A) -2147483648 B) -1
C) Run time error D) 8
 
Answer & Explanation Answer: D) 8

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 14914