Set - 4

Question 6 :

What is the standard you use to wrap up a call to a Web service?

Answer :

Several possible answers depending on your interpretation of the quesiton, but I think you were aiming for SOAP (with the caveat that this is MS version of SOAP)


Question 7 :

What is the difference between boxing and unboxing ?

Answer :

Boxing allows us to convert value types to reference types. Basically, the runtime creates a temporary reference-type box for the object on heap.
Eg:
int i=20;
object o=i;


Question 8 :

Describe the difference between a Thread and a Process?

Answer :

Answer1:
Thread - is used to execute more than one program at a time.
process - executes single program

Answer2:
A thread is a path of execution that run on CPU, a proccess is a collection of threads that share the same virtual memory. A process have at least one thread of execution, and a thread always run in a process context.

Answer3:
The operating system creates a process for the purpose of running a program. Each process executes a single program. Processes own resources allocated by the operating system. Resources include memory, file handles, sockets, device handles, and windows. Processes do not share address spaces or file resources except through explicit methods such as inheriting file handles or shared memory segments, or mapping the same file in a shared way.
Threads allow a program to do multiple things concurrently. At least one thread exists within each process. If multiple threads can exist within a process, then they share the same memory and file resources.

Answer4:
Thread is a light weight process, which is initialized itself by a process. Light weigt processes does not loads resources required by it itself, these are loaded by its parent process which has generated it.


Question 9 :

What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

Answer :

Windows Service applications are long-running applications that are ideal for use in server environments. The applications do not have a user interface or produce any visual output; it is instead used by other programs or the system to perform operations. Any user messages are typically written to the Windows Event Log. Services can be automatically started when the computer is booted. This makes services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. They do not require a logged in user in order to execute and can run under the context of any user including the system. Windows Services are controlled through the Service Control Manager where they can be stopped, paused, and started as needed.


Question 10 :

What is the difference between an EXE and a DLL?

Answer :

An EXE can run independently, whereas DLL will run within an EXE. DLL is an in-process file and EXE is an out-process file