Should you pass exceptions by value or by reference?
No Answer is Posted For this Question
Be the First to Post Answer
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Can class objects be passed as function arguments?
When should you use global variables?
What is the size of a vector?
Why is it difficult to store linked list in an array?
Are strings mutable in c++?
Problem 5: Hero's Formula is A method for calculating the area of a triangle when you know the lengths of all three sides. Let a, b, c be the lengths of the sides of a triangle. The area is given by:A= pp-ap-b(p-c) | wherep= a+b+c2 | | Write a C-language code to calculate area of triangle using above method. Take the three lengths of the triangle from the user and display the area that your program calculates.
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list
what are Access specifiers in C++ class? What are the types?
What are different types of polymorphism supported by C++
Incase of a function declaration, what is extern means?
What is flush c++?