IsUnsigned() function?

Jeffrey H. Hsu jhsu at Neon.Stanford.EDU
Tue Jul 17 07:41:55 AEST 1990


Fellow C hackers,

	Here is a C question I was asked at a Microsoft interview (no, I didn't
get the job...).

	How would you write a space efficient algorithm/function in C that 
takes in an integer and returns 0 if signed and 1 if unsigned?

	IsUnsigned(a)
		int a;
	{
	}

I would appreciate answers from anyone.

Thanks,
Jeff



More information about the Comp.lang.c mailing list