AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
C# Programming
Which of these methods is a rounding function of Math class?
Max()
Min()
Abs()
Round()
Round() rounds up a variable to nearest integer
What will be the output of the given code snippet?
class Program
{
staticvoid Main(string[] args)
double x =3.14;
int y =(int) Math.Abs(x);
Console.WriteLine(y);
}
0
3
3.0
3.1
Answer: Option (B)
Which among the given classes provides types of rounding functions?
Math
Process
System
Object
Answer: Option (A)
int y =(int) Math.Floor(x);
4
double Floor(double X) returns the largest whole number less than or equal to variable X. Here, the smallest whole number less than 3.14 is 3. Output: 3
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies