What is the outcome of the line of code "cout<<abs(-
16.5);"?
1) 16
2) 17
3) 16.5
Answers were Sorted based on User's Feedback
Answer / shailaja
the outcome of this code is 16.5
bcz it will return the absolute value of parameter.
| Is This Answer Correct ? | 18 Yes | 6 No |
Answer / 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 |
Answer / d n gavade
abs() function returns absolute value of given arguments in
integer form because its return type is integer.
so answer will be 16.
if it is fabs() then only we get answer in float,double.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / arash s
16
just read what is "absolute" and u will know why.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nathusingh rathod
Right answer for this question is 16. Had there been fabs
then result would have been 16.5 but as there is only abs()
so it will return integer value i.e 16.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is encapsulation with real life example?
what is opps?why it is use in programming language?
Write on signed and unsigned integers and give three (3) examples each
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
Write a program to demonstrate the use of 'Composition' in C++
What is object and example?
What is the difference between Home and $Home?
What is oops concept with example?
i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????
What does it mean when someone says I oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?