What is the outcome of the line of code "cout<<abs(-
16.5);"?




1) 16


2) 17


3) 16.5

Answer Posted / pramod

The result is compiler error .....Because abs(int) and
abs(long) are the two overloaded functions. When a call to
abs(-16.5) is made, compiler can not find out which one to call.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

• What are the desirable attributes for memory managment?

1704


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1424


What is encapsulation and abstraction? How are they implemented in C++?

611


What is the diamond problem in inheritance?

551


What are the three parts of a simple empty class?

1428






What is class and object in oops?

585


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1624


What is difference between inheritance and polymorphism?

546


What are the features of oop?

605


What are constructors in oop?

566


how to get the oracle certification? send me the answer

1632


What do you mean by overloading?

558


How do you define social class?

583


What is inheritance in oop?

579


Please send ford technologies placement paper 2 my mail id

1632