Wednesday 3 August 2011

VC++ Interview Questions

1) Explain about VC++?
Microsoft visual C++ helps programmers and developers to create windows and .NET based applications. This also helps in developing applications for web, windows based applications, solutions for thin and smart client based mobile devices. It is used for developing applications for windows API, .NET framework, etc.

2) Discuss about the stack based buffer over run detection in VC++?
Stack based buffer over run protects the program from executing malicious code. Function epilogue code checks the returned cookie for similarity if there is a mismatch it stops executing the code. It also moves around the stack which makes the data corruption harder. These features are present in Visual C++ 2005. It also mitigates various buffer over runs through memory decrease.

3) What are all the situations where the /GS compiler is not applied.
These are the following situations where /GS compiler is not applied.
1) When functions do not contain a buffer
2) When optimizations is not enabled
3) It is obvious when functions are defined to have a variable argument list it cannot create a static cookie.
4) If functions are marked with a naked keyword such as (C++) etc a GS compiler cannot be created.
5) When functions have inline assembly code in the start of the program
6) When a buffer is less than 8 bit type it is not possible and can potentially create a security lapse
 
4) State some new features which are incorporated into Microsoft visual C++ 2008?
Some of the new features which are introduced to VC++ are a large set of new MFC classes which will certainly help in building modern user interfaces. TR1 is the major addition to the pack of VC++. This also has new user interface, adjustable panes, and support for Microsoft office ribbon, controls, dialog boxes and windows.

5) Explain about InitApplication()?
To display an output for a certain application programmers have to use InitApplication() method. InitApplication is a Boolean method. This function outputs a true if an application gets succeeded. If it did not succeed it displays a false command. Applications rely on this method to display a certain o/p.

6) Explain about frames?
Frame describes about the borders, dimensions and location of the window. Two types of MFC applications are present which use a frame. Application using frames use a concept known as Document/View architecture. This architecture allows a certain program to be present in applications.

7) Explain about CFrameWnd?
MFC has an extensive set of classes present in its library out of which CFrameWnd is one of those. This is a very important class and it is used frequently. User defined classes can be created by CFrameWnd. To create a windows frame CFrameWnd provides class.

8) Explain about CWinThread class?
If you want to provide a window to an application it is imperative to create a thread which can be done using CWinThread. A public member variable is used with CWinThread is m_pMainWnd. The main advantage which you can get when using this thread, it terminates the application without any hassles.

9) Name some important features of VC++?
Some of the important features of VC++ are as follows
1) Smart pointers
2) New containers
3) Expression parsing
4) Polymorphic function wrappers
5) Type traits and sophisticated random number generators.

10) Explain about functional?
Functional defines a huge number of templates which help construct function objects which defines operator. Function pointer can be described by a function object. It stores information which can be accessed during the functional call.

11) Explain about the function regex?
This defines a template to parse certain regular expressions. It also defines several classes and functions to search text that is matching a regular expression object. There are many declarations, type definitions, template functions, and operator.

12) Explain about regex_search function?
Regex_search function searches for a regular expression. A true function is returned only when the search in its operand sequence succeeds. It also defines the various capture groups in the regular expression. Some of the parameters are alloc, Elem, RXtraits, etc.

13) Explain about tuple in visual c++?
Tuple defines instances of objects in varying types. Declarations, template functions and functions are defines in tuples. In class there are three elements they are tuple class, tuple size Class and tuple element Class are defined in Visual C++.

14) Describe about unordered_map?
Unordered_map defines container template classes such as unordered map and unordered multimap template. Under declarations unordered map Class and unordered multimap class are defined. These classes store hash table.

15) Explain about type_traits?
Type_traits give information about type arguments and provide compile time constants.
Syntax of type_traits is #include
This function is very useful as it helps during the compile time. Specific extensions are provided which give useful information as to whether an integral constant has a true value or false value.

16) Explain about typedef?
A type predicate takes one or more arguments and it is a template. If a type predicate is true it is publicly derived directly or indirectly from true type def. In case it is false it is publicly derived from false type def.

17) Explain about utility?
Utility function has several general templates and can be used in Standard template library. Some of them are tuple element Class which is used to wrap the type of pair element. Get function is used to get an element from the pair object. Tuple size class wraps the pair element count.

0 comments:

Post a Comment

Popular Posts

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls