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?

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

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

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

Which Indian cricketer is known as "Brown Bradman"?

What was the subject of the majority of the published works of Augustinian friar, Gregor Mendel, whose..................

In October 2009, the International Olympic Committee (IOC) announced the 2016 Summer Olympics from 5....................

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");

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

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.

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).