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




1) 16


2) 17


3) 16.5

Answer Posted / prabakaran

1)16
because abs() is used to calculate the absalute value of
integer only,so it convert the floating point value -16.5
into -16,and
calculate tha abs() value

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

officer say me - i am offered to a smoking , then what can you say

1554


Describe these concepts: Polymorphism, Inheritance and Abstraction.

586


How do you define a class in oop?

600


What is polymorphism in oop example?

496


What is coupling in oop?

571






Can you explain polymorphism?

558


What is the renewal class?

2145


Why do we need oop?

641


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1123


What does and I oop mean in text?

595


What is the difference between a mixin and inheritance?

491


What is pure oop?

574


is there any choice in opting subjects like 4 out of 7

1708


What is constructor in oop?

558


Why is abstraction needed?

545