मंगलवार, जून 29, 2010

C++ DLL .Net

OOPS, C++, Standard Template Library (STL)


Note: For the following questions, answer only for C++. DO NOT indulge with C++.Net or VC++.Net.

  1. In a function overloading; if only return type is different; will that be a compiler error?
  2. In a function overriding; if only return type is different; what really that indicates? Does it provoke for any error?
  3. What is copy constructor? Why developer need to create it's own copy constructor when compiler provides it as a default? What it returns?
  4. What is the difference between copy constructor and assignment operator? Explain memory allocation w.r.t. the same? What assignment operator returns?
  5. What is shallow copying and deep copying?
  6. What is the difference between call by reference and call by pointers?
  7. Is templates an
    achievement of polymorphism?
  8. What do you understand by run time polymorphisms and run time type identification (RTTI)?
  9. What is vector? What is the difference between arrays and vectors?
  10. Why do we use maps?
  11. What is the difference between new operator and malloc()? What is the difference between delete operator and free()?
  12. Consider int nMarks[32]; what delete nMarks; will do? And what delete [] nMarks; will?
  13. Explain function to pointer concept.
  14. Where can we use static keyword? Explain it's usage for the variables?
  15. Explain different types of memory allocations in C++ such as heap segment,
    data segment and static memory.
  16. What is the use of extern keyword and how the memory is allocated for the variable declared as extern?
  17. Why do we use virtual destructors? Is there anything called as virtual constructors? If we want to implement virtual constructors, how to do that?
  18. How to implement singleton design pattern in C++?
  19. What do you mean by named constructors?
  20. Can we have private constructors?
  21. Why do we use virtual base classes?
  22. Can we implement multiple inheritance in C++? If yes, how?
  23. What are the const functions?
  24. What is the difference between const char * and char *const?
  25. Why do we use void pointers?
  26. What is class diagram and sequence diagram?
  27. What is Association, Aggregation and Composition?
  28. How do we handle base exception in pure C++?
  29. Brief the significance of VPTR and VTABLE?
  30. What are smart pointers?

Visual C++ (VC++ IDE), Microsoft Foundation Classes(MFC), Software Development Kit (SDK) i.e. Windows Programming under C

  1. How OS knows about the EXE file created either by VC++6.0 or VC++.Net?
  2. What is message pumping?
  3. Describe SendMessage() and PostMessage().
  4. What is PostThreadMessage()?
  5. Why most of the classes are derived by CObject? What functionalities it provide?
  6. Name few of the classes which are not derived by CObject?
  7. Explain Document View architecture in terms of it's usage; classes, macros and some of the important functions involves in it.
  8. What are the handlers?
  9. Explain HWND and CWnd.
  10. Explain message mapping and macros related to it? Which class handles all messages.
  11. Give a minimal skeleton VC++ program for creating a window.
  12. What are the uses/functionalities provided by CRuntimeClass?
  13. What are the message and functions used for ticking menu items as "radio button" OR "check box"?
  14. What is device context? What classes are used for the same?
  15. Explain DDX and DDV? How can we limit the length of the edit field?
  16. How can we restrict the format (mask) of a edit field?
  17. Explain the concept of Modal and Modeless dialog? How syntax differs in creation of these.
  18. What is synchronous and asynchronous messaging?
  19. How compilers preserve function calls?
  20. Explain the concept and implementation of SDI and MDI.
  21. What is WindowProc?
  22. Explain macro DECLARE_MESSAEGE_MAP(), BEGIN_MESSAGE_MAP(..,..) with their internals?




Dynamic Linked Library (DLL), Component Object Model (COM), Distributed COM (DCOM)

  1. What do you mean by linking?
  2. Why COM is required? What is it?
  3. What is the difference between regular DLL and extension DLL?
  4. What is static library and dynamic library?
  5. What are .lib and .dll files? What will be the concern of the .exe file using each of these files?
  6. Distinguish between ActiveX EXE and ActiveX DLL.
  7. What is static linking and dynamic linking?
  8. Mention the disadvantages of extension DLL.
  9. Explain the usage of LoadLibrary(), FreeLibrary() and function to pointer while using DLL.
  10. What do you mean by name mangling? Is it just a name decoration?
  11. Why DCOM is required when COM DLLs exist?
  12. Brief about interfaces in COM.
  13. Consider these two scenarios: DLL is accessed by two different applications and EXE is accessed by two different application. Comment on the memory usage of DLL, EXE and both of the applications.
  14. What is ClassID and GUIDs?
  15. Explain CoCreateInstance and CoInitialize?
  16. What is Dual Interface?
  17. What do you mean by Location transperancy?
  18. What are CComPtr and CComQIPtr?
  • Some quickies: (If anyone is interested; I am surely not!)
  • A semaphore is an object that can have a state of ON or OFF. It is used to communicate between two or more tasks. If you have two tasks, A and B, A can set a semaphore to ON, kick off task B, when task B has finished it can set the semaphore to OFF then task A knows that B is finished.
  • A Mutex (mutual exclusion) is like semaphore in that it has two states, but in reality they are more like LOCKED and UNLOCKED. Typically, with a Mutex, you have a Lock and and Unlock function. When a task calls the Lock function, it either immediately locks the mutex if it was unlocked or it causes the task to wait until the mutex is unlocks by another task.
  • A critical section is a mutex that is tied to a block of code. It's purpose is to only allow one task at a time be in a block of code.

C#, ASP.Net, ASP.Net Internals

  1. What are delegates? What is the significance of Invoke() method?
  2. Why is keyword as used for?
  3. In inheritance, explain the use of keywords overrides and new.
  4. How to implement singleton design pattern in C#?
  5. What is reflection? When this used? Which namespace is used for it?
  6. What do you mean by localization? Have you ever implemented it?
  7. Explain the scenario of inter portal communication with System.Net - HttpRequest and HttpResponse.
  8. What is global namespace?
  9. Brief SSO concept.
  10. What are the disadvantages of viewstate?
  11. What is Context?
  12. Explain the use of global.asax, it's events and explain how those can be used to maintain the number of user visiting the website.
  13. What is the difference between abstract class and interface?
  14. Distinguish between Copy() and Clone().
  15. What do you mean by satellite assembly?
  16. Apart from class, where else can we use sealed keyword?
  17. Explain different types of validator controls.
  18. Explain WebService and WebMethods.
  19. Why do we use internal protected access specifier?
  20. Explain the concept of Generics in C# 2.0
  21. Why do we use partial classes?
  22. Distinguish between remoting and web services?



.Net, .Net Architecture, .Net 2.0, Design Patterns




  1. What are value types and reference types? Further explain boxing and unboxing.
  2. Explain memory allocation in .Net i.e. stack memory and heap memory.
  3. Distinguish between String and StringBuilder.
  4. Explain singleton design pattern and also mention how we can break it.
  5. What is the role of JIT in CLR?
  6. Why do we use Global Assemble Cache?
  7. Explain the concept of Application Domain and assembly.
  8. How languages are type safe?
  9. What is MSIL?
  10. What is garbage collection? How is it implemented in .Net?
  11. What is __gc?
  12. Explain collections in .Net. i.e. HashTable, ArrayList and IComparable interface.
  13. Explain Connected and Disconnected scenario in ADO.NET.
  14. Why do we use Fill() and Update()?
  15. What is Int16, Int32, Int64 in .Net?
  16. What is DLL Hell and how it is removed from .Net?
  17. In GAC, how do we maintain different versions of DLL?
  18. Why do we use .config file?


Oracle 10g as a backend

  1. Explain different types of joins? Mainly self join and outer join. Further explain outer join in detail with its types?
  2. Explain group by clause, related aggregate functions and having clause?
  3. What do you mean by referential integrity?
  4. What are the different types of triggers?
  5. Explain difference between in and out parameters?
  6. What are ACID properties?
  7. What is the difference between primary key and unique not null?
  8. Can a column with constraint unique contain null value?
  9. What is the difference between delete from tablename and truncate table tablename?
  10. Till what normalized form have you normalized
    the table?
Software Costing

  1. Function Point Estimation
  2. Software Costing