What is the outcome of the line of code "cout<<abs(-
16.5);"?
1) 16
2) 17
3) 16.5
Answer Posted / 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 |
Post New Answer View All Answers
What is methods in oop?
Get me a number puzzle game-program
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?
Which is better struts or spring?
Templates mean
#include
Why is there no multiple inheritance?
What causes polymorphism?
Why is static class not inherited?
What are the benefits of interface?
How do you define social class?
What does I oop mean?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
write a program to find 2^n+1 ?
What are the 5 oop principles?