What is this C function supposed to do based on description?
Posted
by
user1261445
on Stack Overflow
See other posts from Stack Overflow
or by user1261445
Published on 2012-06-11T22:34:53Z
Indexed on
2012/06/11
22:40 UTC
Read the original article
Hit count: 145
unsigned int hex_c0c0c0c0():
Allowed operators: + - = & | ~ << ! >>
Allowed constants: 1 2 4 8 16
Return 0xc0c0c0c0
The above is the description I have been given and I have to write the code for it. Can someone tell me what exactly the function is supposed to do? All the description says is what I have pasted above, so I'm not sure what my goal is. I'm sure it is an easy enough function to program on my own, but it would help if someone could tell me what the function is supposed to do, and maybe provide sample input/output so that I know my code is working correctly once I program this.
Thanks.
© Stack Overflow or respective owner