Showing posts with label COM Job Interview Questions. Show all posts
Showing posts with label COM Job Interview Questions. Show all posts

Sunday, January 20, 2008

COM interview Questions

1. Interop Services?
The common language runtime provides two mechanisms for interoperating with unmanaged code:
• Platform invoke, which enables managed code to call functions exported from an unmanaged library.
• COM interop, which enables managed code to interact with COM objects through interfaces.
Both platform invoke and COM interop use interop marshaling to accurately move method arguments between caller and callee and back, if required.
2. How does u handle this COM components developed in other programming languages in .NET?
3. What is RCW (Runtime Callable Wrappers)?
The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object.
4. What is CCW (COM Callable Wrapper)
A proxy object generated by the common language runtime so that existing COM applications can use managed classes, including .NET Framework classes, transparently.
5. How CCW and RCW is working?
**
6. How will you register com+ services?
The .NET Framework SDK provides the .NET Framework Services Installation Tool (Regsvcs.exe - a command-line tool) to manually register an assembly containing serviced components. You can also access these registration features programmatically with the System.EnterpriseServicesRegistrationHelper class by creating an instance of class RegistrationHelper and using the method InstallAssembly
7. What is use of ContextUtil class?
ContextUtil is the preferred class to use for obtaining COM+ context information.
8. What is the new three features of COM+ services, which are not there in COM (MTS)?
**
9. Is the COM architecture same as .Net architecture? What is the difference between them?
**
10. Can we copy a COM dll to GAC folder?
**
11. What is Pinvoke?
Platform invoke is a service that enables managed code to call unmanaged functions implemented in dynamic-link libraries (DLLs), such as those in the Win32 API. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed.
12. Is it true that COM objects no longer need to be registered on the server?
Answer: Yes and No. Legacy COM objects still need to be registered on the server before they can be used. COM developed using the new .NET Framework will not need to be registered. Developers will be able to auto-register these objects just by placing them in the 'bin' folder of the application.
13. Can .NET Framework components use the features of Component Services?
Answer: Yes, you can use the features and functions of Component Services from a .NET Framework component. http://msdn.microsoft.com/library/techart/Pahlcompserv.htm

Tuesday, October 9, 2007

C Interview Questions

Comment lines are
a compiled in the object code
b ignored by the compiler
c included in the executable code
d ignored by the linker.

A syntax error is signalled by the
a compiler
b linker
c editor
d run time system.

Typically a variable defined in a function/procedure/module has
a scope for the whole file
b global scope
c local scope
d retains its value between calls.

A program construct used for selection is
a if…else

b for loop
c while loop
d a sequence.

What is the result of the following expression?
6+12*3-4/2
a 22
b 25
c 40
d 52

What is the result of the following expression?
5+((2*(9+5))-4)/2
a 12.5
b 14.5
c 15
d 17

A run-time error is ALWAYS caused by
a division by zero

b incorrect logic
c error in syntax
d incorrect linkage

When a program is running the value of a constant
a can be changed
b cannot be used
c is always hidden
d cannot be changed.

The type of a function/procedure/module is determined by
a its arguments
b the value returned
c its name
d the address returned.

Which type of code is editable?
a object
b executable
c library
d source.

Test results are proved by a comparison of
a logical to syntax errors
b expected to actual input
c expected to actual output
d run time to logical errors

An argument passed by reference passes
a a global variable
b a constant
c a value
d an address

Every call to a function is checked by the compiler against the
a parameter list
b variable description
c function prototype
d program prototype

The function atoi() returns the type
a char
b float
c integer
d double

How many characters can a string hold when declared as follows?
char name[20];
a 18
b 19
c 20
d 21

Directives are translated by the
a pre-processor
b compiler
c linker
d editor

How many bytes does “D” use?
a 0.
b 1.
c 2.
d 3.

A standalone executable file requires
a no run time system
b a run time system
c a development environment
d compilation.

The switch construct is used for
a sequence
b selection
c iteration
d flags.

How many times will the following loop execute?
for(j=1; j<=10; j=j-1);

a 1.
b 10.
c Never.
d Forever.

Which one of the following is a loop construct that will always be executed once?
a for
b switch
c while
d do…while

What result is in the variable num after execution of the following statements?
int num = 58;
num % = 11;
a 3
b 5
c 8
d 11

What is the result after execution of the following code if a is 10, b is 5 and c is 10?
if((a>b) && (a<=c))
a = a + 1;
else
c = c + 1;

a a = 10, c = 10
b a = 11, c = 10
c a = 10, c = 11
d a = 11, c = 11

What is the return type of the following function prototype?
float calc(int, float, char, char);
a int
b char
c float
d void

What is the maximum number of characters that can be held in the string variable char
AddressLine[40];
a 38
b 39
c 40
d 41

What result is in the variable num1 after execution of the following statements?
int j = 1, num1 = 4;

while (++j <= 10)
{
num1++;
}
a 11
b 12
c 13
d 14

What is the result in the variable len after execution of the following statements?
int len;
char str1[ ] = {“39 March Road”};
len=strlen(str1);
a 11
b 12
c 13
d 14

What is the result in the variable str3 after execution of the following statements?
char str2[] = {“Books”};
char str3[20] = {“Fair”};
strcat(str3,str2);
a “Books Fair”
b “BooksFair”
c “Fair Books”
d “FairBooks”

Each instance of a class has a different set of
a class interfaces
b methods
c return types

d attribute values.

Methods in a class define the
a operations to be performed

b actions to be performed by its attributes
c actions to be performed on another class’s objects
d operations to be performed on another class’s attributes.

How many instances of a class can be declared?
a None.
b One.
c Ten.

d As many as required.

Typically a class is made up of
a attributes only
b methods only

c attributes and methods
d interfaces

A method declared as private can be accessed by
a its class methods only

b superclasses only
c subclass methods only
d all classes.

A constructor for a class MUST have
a no parameters
b a different na me to the class

c the same name as the class
d a return value.

One method will overload another method if they have
a different names but the same parameters
b different names with no parameters
c the same name with no parameters
d the same name but different parameters