Solve This (? + ? + ?=30)

If 1111=R, 2222=T, 3333=E, 4444=N Then 5555=?

Guess the Hindi Muhawara from the following whatsapp Emoticons?

Sweet, Medicine, Film, Girl, City, Car, Place, Doggy all are name same, guess which word it is?

Guess me who am I, I am the first on earth, the second in heaven...

Four Question, One Answer: One River Name, One Flower Name, One Film Name, One Actress Name?

A girl is blind, deaf, dumb and uneducated too. A boy loves her. How would he propose without touching her?

Which Indian cricketer is known as "Brown Bradman"?

Which of the following Pair are not parent and child who have both won the Nobel prize?

Who was the first women nominated member of Rajya Sabha of India?

What is the simples way to check if the sum of two unsigned integers has resulted in an overflow.

Try this

int uadd32(uint32 a,uint32 b) { unsigned long long x=(unsigned long long) a+b; if (x>0xffffffff) return 0; // 0 means overflow return 1; // 1 means no overflow }

May not be fastest solution - a = b+c if a is truncated because of overflow the c != a-b

Code

a = b + c; if (c == (a-b)) printf("No Overflow"); else printf("Overflow");

Divide the array in two subarrays of n/2 sizes each such that the difference of the sum of two subsets is as minimum as possible. If n is even, then sizes of two subarray must be n/2 and if n is odd, then size of one subarray must be (n-1)/2 and size of other subset must be (n+1)/2.

Write a program to reverse the bits of an unsigned integer ??

Say you are given

int a[ ] = {1,2,3,4}; int b[ ] = {4,3,2,1}; int S = 5;

Now the task is to find all pairs of two number which adds up to S (One number from a and other number from b).