Interviews5 answers
Add Two Values without using '+' Operator. ?
5 Answers
result = item1 | item2; //for integer types
Anas PKPosted Jan 16, 2017, 5:58 AM EST
Sum - The method can be used on objects that implement IEnumerable with a type of decimal, double, int or long.
using LINQ:
public void SumNum()
{
int[] array1 = {1,2};
int sum = array1.Sum();
}
Shweta SawantPosted Dec 14, 2016, 9:39 AM EST
by using operator overloading
Sunil BabuPosted Apr 2, 2016, 3:33 AM EDT
int a=5;
int b=6;
for(int I=0;i
Sankar SaiPosted Feb 17, 2016, 3:15 AM EST
public int Add(int a,int b)
{
return (a-(-b);
}
Akash VarshneyPosted Sep 18, 2015, 2:53 AM EDT
