YouTube Icon

Interview Questions.

Top 21 Microsoft Visual C++ Interview Questions - Jul 26, 2022

fluid

Top 21 Microsoft Visual C++ Interview Questions

Q1. Explain About The Function Regex?

This defines a template to parse positive normal expressions. It additionally defines several training and features to look textual content this is matching a ordinary expression object. There are many declarations, kind definitions, template functions, and operator.

Q2. What Is The Difference Between Struct And Class?

There are few differences:

All members of struct are public.

Default inheritance for struct is public, wherein as for sophistication the default inheritance is non-public.

Q3. Explain About Utility?

Utility function has several wellknown templates and may be utilized 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 detail from the pair item. Tuple length class wraps the pair element depend.

Q4. State Some New Features Which Are Incorporated Into Microsoft Visual C++ 2008?

Some of the brand new capabilities that are added to VC++ are a massive set of recent MFC instructions with a purpose to certainly help in building modern user interfaces. TR1 is the primary addition to the % of VC++. This also has new consumer interface, adjustable panes, and guide for Microsoft office ribbon, controls, conversation containers and home windows.

Q5. Discuss About The Stack Based Buffer Over Run Detection In Vc++?

Stack primarily based buffer over run protects this system from executing malicious code. Function epilogue code tests the again cookie for similarity if there's a mismatch it stops executing the code. It additionally actions across the stack which makes the statistics corruption harder. These capabilities are found in Visual C++ 20@It additionally mitigates various buffer over runs thru reminiscence decrease.

Q6. What Problem Does The Namespace Feature Solve?

Multiple providers of libraries would possibly use not unusual international identifiers inflicting a name collision when an software tries to hyperlink with two or greater such libraries. The namespace feature surrounds a library?S external declarations with a completely unique namespace that eliminates the ability for the ones collisions.

Q7. What Is The Use Of Afx_manage_state ?

MFC makes use of the useful resource take care of of the primary application to load the resource template. If you have got an exported function in a DLL, which includes one that launches a conversation container within the DLL, this template is really stored inside the DLL module. You want to switch the module nation for the suitable take care of for use. You can try this by means of adding the following code to the start of the feature:

AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

This swaps the present day module kingdom with the kingdom returned from AfxGetStaticModuleState till the stop of the contemporary scope.

Q8. Name Some Important Features Of Vc++?

Some of the critical functions of VC++ are as follows:

Smart suggestions

New boxes

Expression parsing

Polymorphic function wrappers

Type tendencies and complex random number generators.

Q9. Explain About Vc++?

Microsoft visual C++ facilitates programmers and developers to create home windows and .NET based totally applications. This additionally facilitates in developing programs for net, windows based packages, answers for skinny and smart consumer based totally cell gadgets. It is used for developing programs for windows API, .NET framework, and so on.

Q10. Explain About Cwinthread Class?

If you need to offer a window to an software it is imperative to create a thread which may be performed the use of CWinThread. A public member variable is used with CWinThread is m_pMainWnd. The predominant advantage which you could get whilst using this thread, it terminates the application without any hassles.

Q11. Explain About Tuple In Visual C++?

Tuple defines instances of gadgets in various types. Declarations, template functions and capabilities are defines in tuples. In class there are three factors they are tuple magnificence, tuple size Class and tuple element Class are described in Visual C++.

Q12. What Is Carchive Class Does?

This magnificence helps to do the serialization and de-serialisation. Storing of items from and to disk storage. The CArchive class allows person to shop a complicated items to the everlasting storage (normally disk storage) binary format. This items persists after the ones items are deleted. Later you could load the gadgets from permanent storage, reconstituting them in reminiscence. 

Q13. Describe About Unordered_map?

Unordered_map defines box template instructions inclusive of unordered map and unordered multimap template. Under declarations unordered map Class and unordered multimap magnificence are defined. These training save hash desk.

Q14. What Is The Disadvantage Of A Template Function?

A template characteristic cannot be dispensed within the obj shape. This is because, fuction with which parameters the template function is going to be referred to as is determined at the run time only. Therefore an obj shape of a template characteristic can not be made through simply compiling it.

Q15. Explain About Initapplication()?

To show an output for a sure utility programmers must use InitApplication() approach. InitApplication is a Boolean method. This feature outputs a real if an utility receives succeeded. If it did now not prevail it displays a false command. Applications depend upon this technique to show a positive o/p.

Q16. What Are All The Situations Where The /gs Compiler Is Not Applied?

These are the subsequent conditions wherein /GS compiler is not carried out.

When functions do no longer contain a buffer

When optimizations is not enabled

It is plain while functions are defined to have a variable argument listing it cannot create a static cookie.

If functions are marked with a naked keyword together with (C++) and so forth a GS compiler can not be created.

Q17. Explain About Cframewnd?

MFC has an intensive set of training found in its library out of which CFrameWnd is one of those. This is a totally critical magnificence and it's far used regularly. User described lessons can be created by means of CFrameWnd. To create a home windows body CFrameWnd gives elegance

Q18. Explain About Regex_search Function?

Regex_search characteristic searches for a ordinary expression. A real characteristic is returned best whilst the quest in its operand collection succeeds. It also defines the various seize companies within the everyday expression. Some of the parameters are alloc, Elem, RXtraits, and so on.

Q19. Explain About Frames?

Frame describes about the borders, dimensions and place of the window. Two forms of MFC programs are present which use a frame. Application the usage of frames use a concept referred to as Document/View architecture. This architecture lets in a sure software to be present in applications.

Q20. Explain About Typedef?

 A type predicate takes one or more arguments and it's miles a template. If a kind predicate is authentic it's far publicly derived at once or not directly from true type def. In case it's far false it's miles publicly derived from fake type def.

Q21. Can We Declare A Static Function As Virtual?

The virtual feature mechanism is used on the precise object that determines which virtual function to call. Since the static features aren't any manner associated with objects, they can't be declared as virtual.




CFG