Archives: CPP_Programming

C++ Interview Question and Answers

C++ Interview Question and Answers – Part 1 C++ Interview Question and Answers – Part 2 C++ Interview Question and Answers – Part 3


C++ Interview Question and Answers – Part 3

1. What is the difference between the keywords struct and class in C++? Answer : By default the members of struct are public and by default the members of the class are private. 2. Explain Call by address and Call by reference Answer : Call by address: We send address of the actual parameters instead • Read More »


C++ Interview Question and Answers – Part 2

51. What is dynamic memory allocation? Answer : A dynamic memory allocation uses functions such as malloc() or calloc() to get memory dynamically. If these functions are used to get memory dynamically and the values returned by these function are assigned to pointer variables, such a way of allocating memory at run time is known • Read More »


C++ Interview Question and Answers – Part 1

1. Explain the difference between reference and pointer? Answer : a)References are less powerful than pointers. Once a reference is created, it can’t refer to other object later. Pointers provide the powerful facilities than references. b) References are safer and easier to use than pointers. Pointers are comparatively difficult to use. 2. What are command • Read More »