Write a functin to add two no. Both no can be int, float.

Answers were Sorted based on User's Feedback



Write a functin to add two no. Both no can be int, float...

Answer / mithun

public double Add(double a, double b)
{
double c =a + b;
return c;
}

Is This Answer Correct ?    13 Yes 1 No

Write a functin to add two no. Both no can be int, float...

Answer / gopathi vamseedhar

public int fname(int a,int b)
{
int c;
c=a+b;
messagebox.show("answer"+c);
}

Is This Answer Correct ?    5 Yes 11 No

Write a functin to add two no. Both no can be int, float...

Answer / aaaa

public int fname(int a,int b)
{
int c;
c=a+b;
messagebox.show("answer"+c);
return(c);
}

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More C Sharp Interview Questions

What are the two uses of a ‘using’ statement in c#?

0 Answers  


What is the use of main method in c#?

0 Answers  


Why constructor is used in c#?

0 Answers  


Why is it efficient to use System.string under System.Text.StringBuilder ?

0 Answers   Siebel,


Why singleton is sealed?

0 Answers  


Hi!!! my question is how we can apply or do Themes in C#.NET? please any sample or website from where i can get the answer.

1 Answers  


Can we override interface method?

0 Answers  


What is foreach loop in c#?

0 Answers  


is it possible to inherit a class but methods declared in the class should not be inheritable i possible how?

8 Answers   Microsoft,


Is there a way of specifying which block or loop to break out of when working with nested loops?

0 Answers  


What is a proxy of the server object in .NET Remoting?

1 Answers   BirlaSoft,


What is the difference between method and constructor in c#?

0 Answers  


Categories