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 is the difference between paramaterized constructor and copy constructor?

0 Answers   HCL,


What is thread and explain states of a thread in c#?

0 Answers  


Name the control which cannot be placed in mdi?

0 Answers  


How do I count the length of a string in c#?

0 Answers  


How to make a class non-inheritable other than sealed?

7 Answers  






What is property c#?

0 Answers  


What is a thread? What is multithreading?

0 Answers  


What is namespace c#?

0 Answers  


without modifying source code if we compile again, will it be generated MSIL again?

0 Answers  


What is the difference between int.Parse() and Convert.toInt32().

2 Answers  


Can abstract class have parameterized constructor?

0 Answers  


What is instantiating a class?

0 Answers  


Categories