Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

What problem may arise with the following functions in a program ? Explain.

int fun();

Int fun(int x=0 ,int y=0);


Choose the correct alternative and justify it.

The advantage of inline function is

A. it takes less memory

B. it takes less time to compile

C. it takes less time to execute

D. It is easy to write.



“Compiler always provides an implicit default constructor for every class”. True or False. Justify your answer


Is it allowed to define constructor in private section of the class?If no, then give explanation for the same. If yes then explain how will it be accessible.



When do need to include the explicit destructor in a class?Explain with example. 

 

Write a program to define a class A with data member x and a parameterised constructor to initialize it. Define a class B with data member y and a parameterised constructor to initialize it. Write a function to calculate and print LCM of x & y.



Differentiate between function overriding and function overloading.

If a program can be written using function overloading and using default arguments,which one is preferable?Explain giving example.

 

 Write overloaded functions to find the area of scalene,isosceles and equilateral triangle.

Area of scalene triangle = √(s(s-a)(a-b)(s-c))

Area of isosceles triangle = ½[√(a2 − b2 ⁄4) × b]

Area of equilateral triangle= (√3/4)a2 



Write a c program to search page 11 in a book where you don’t visit every page from 1 to 50. You open any random page in the book and check its page number. If the current page number is greater than 11, then 11 is on the left side of the current page.

 Create a class which stores a string and its length as data members. Include all the constructors. Include a member function to join two strings and display the 

concatenated string. 

Write a program to create a class that stores name and subject marks of two students. Using dynamic constructor allocate name and subject marks. Display the details along with average mark.

Write a program in which you have to find the 'volume and Area of 5 Rooms' by using class and objects


LATEST TUTORIALS
APPROVED BY CLIENTS