answersLogoWhite

0

The round method of the Math class is overloaded. You can either pass a double or a long into the round method

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Engineering

What is the function for rounding off numbers?

In Excel, the function is Round(number, num_digits) wherenumber is the number that you want to round,andnum_digits is the number of digits after the decimal point that you want.If num_digits < 0 then the number is rounded to that many digits to the left of the decimal point.


How many photos can you get out of a roll of flim?

Divide the lenght of the roll by 2*(pi^2) and round to the next number.


Can there be at least some solution to determine the number of arguments passed to variable argument list function?

Yes. Use a control parameter before the variable argument list that determines how many arguments will follow. E.g., the printf() function uses a string parameter as the control parameter. The number of escape sequences in the string determines the number of arguments that are expected to follow, and each escape sequence in the string is expanded from left to right according to the arguments that follow. A simpler approach is to pass the number of arguments that will follow as a named argument. E.g.,void print_nums(int n, ...){// n tells you how many numbers are to be expected in the va_list.}AnswerYes, there can be solution.#1: explicitly specifing:extern void variadic_1 (int n, ...);variadic_1 (3, "first", "second", "third");#2: using terminator:extern void variadic_2 (...);variadic_2 ("first", "second", "third", NULL);


In many programs a statement called return -EINVAL is usedwhat does it mean?

EINVAL means error - invalid argument.


What is the character count method?

The character count method is a way to identify the size of a data frame during transmission. A number in the header tells how many characters are in the frame, so the receiver knows where it ends. Its main disadvantage is that if the count is corrupted during transmission, synchronization can be lost. Because of this, more reliable framing methods are commonly used today.