Technical Questions

Q:

Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?

A) x contains a reference to a Circle object B) You can assign an int value to x
C) x contains an object of the Circle type D) x contains an int value
 
Answer & Explanation Answer: A) x contains a reference to a Circle object

Explanation:
Report Error

View Answer Report Error Discuss

10 12513
Q:

Which of the following is not part of performance testing?

A) simulating many users B) measuring response times
C) generating many transactions D) recovery testing
 
Answer & Explanation Answer: D) recovery testing

Explanation:

In software engineering, performance testing is in general, a testing practice performed to determine how a system performs in terms of responsiveness and stability under a particular workload.

Report Error

View Answer Report Error Discuss

10 24713
Q:

What are the data units at different layers of the TCP / IP protocol suite?

Answer

The data unit created at the application layer is called a message, at the transport layer the data unit created is called either a segment or an user datagram, at the network layer the data unit created is called the datagram, at the data link layer the datagram is encapsulated in to a frame and finally transmitted as signals along the transmission media.

Report Error

View answer Workspace Report Error Discuss

Subject: Networking
Job Role: Network Engineer

10 11923
Q:

Explain the popular multiprocessor thread-scheduling strategies.

Answer

  1. Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.

  2. Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.

  3. Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.

  4. Dynamic scheduling: The number of thread in a program can be altered during the course of execution.

Report Error

View answer Workspace Report Error Discuss

9 8481
Q:

main()

{

float me = 1.1;

double you = 1.1;

if(me==you)

printf("yes");

else

printf("No");

}

A) Yes B) No
C) Both D) Compilation error
 
Answer & Explanation Answer: B) No

Explanation:

For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.

Report Error

View Answer Report Error Discuss

Filed Under: Software Testing
Job Role: Software Architect

9 11394
Q:

What is busy waiting?

Answer

The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

Report Error

View answer Workspace Report Error Discuss

9 5550
Q:

What would be the output of the following program?

main()

{

    extern int fun ( float );

    int a;

    a = fun ( 3. 14 );

    printf ("%d", a);

}

int fun ( aa )

float aa ;

{

     return ( (int) aa );

}

Answer

Error occurs because we have mixed the ANSI prototype with K & R style of function definition.


When we use ANSI prototype for a function and pass a float to the function it is promoted to a double. When the function accepts this double into a float a type mismatch occurs hence the error.


The remedy for this error could be to define the function as :


int fun (float aa)


{


  ....


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

9 8093
Q:

Different IP address on same network?

Answer

There are two IP address assigned to each device on a Wi-Fi network.


 


An Internal (Private) and an External (Public) IP address.


 


Internal IP address is used for communication between Your computer and a smartphone or whatever devices that are connected to that Wifi network. This is unique for each. If they are same the system cannot differentiate between each device.


 


While, the External IP address is that visible to the the internet - the websites, the internet connected Apps so on. By default, Routers with NAT (all routers today have it) assign same Public IP address to all devices under its network.

Report Error

View answer Workspace Report Error Discuss

9 1673