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



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

Answer / shankar

None of them

Is This Answer Correct ?    3 Yes 4 No

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

Answer / naga

Ans: 16.5
The numerical value of a real number without regard to its
sign. For example, the absolute value of &#8722;4 (written |-4|)
is 4. Also called numerical value.

Is This Answer Correct ?    1 Yes 2 No

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

Answer / 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

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

Answer / tandoor

16

Is This Answer Correct ?    2 Yes 4 No

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

Answer / prabakaran

2)17

Is This Answer Correct ?    3 Yes 5 No

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

Answer / monika

-16

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More OOPS Interview Questions

What are oops methods?

0 Answers  


What is virtual constructors/destructors?

4 Answers   IBS,


Why is polymorphism needed?

0 Answers  


What is the importance of oop?

0 Answers  


In OverLoading concept,Why they are not consider return value and why they are consider only parameters in method? For ex: public int Add(int a,int b){...} public String Add(int a,int b){...}

1 Answers  






What is OOPS and How it is different from Procedural Programming ?

23 Answers   HP, Infosys, Thyrocare,


What are the fields of vtable

1 Answers   Mphasis,


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

0 Answers  


different types of castings

3 Answers   Siemens,


What is coupling in oop?

0 Answers  


Child cObj = new Parent() Wahts the output ?

8 Answers   Patni, TCS,


What is destructor in oop?

0 Answers  


Categories