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 / naga
Ans: 16.5
The numerical value of a real number without regard to its
sign. For example, the absolute value of −4 (written |-4|)
is 4. Also called numerical value.
Is This Answer Correct ? | 1 Yes | 2 No |
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 are oops methods?
What is virtual constructors/destructors?
Why is polymorphism needed?
What is the importance of oop?
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){...}
What is OOPS and How it is different from Procedural Programming ?
23 Answers HP, Infosys, Thyrocare,
What are the fields of vtable
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.
different types of castings
What is coupling in oop?
Child cObj = new Parent() Wahts the output ?
What is destructor in oop?