Hello all,
func(int* a, int b)
{
while((*a&(1 << b))==0);
}
Wwhat is the hidden purpose of this code?
Thanks,
Arun
Hello all,
func(int* a, int b)
{
while((*a&(1 << b))==0);
}
Wwhat is the hidden purpose of this code?
Thanks,
Arun
To see how long it takes you to post a duplicate thread, under a different name?
Tricky C
Not to mention, cross-post
Purpose of a function
http://forums.devshed.com/c-programm...on-748853.html
> To see how long it takes you to post a duplicate thread, under a different name?
I checked the IP addresses, it looks like they both go to the same college.
Figures they would both post the same homework, if they're both on the same course.
They did sign up at the same time though
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
LOL, busted by detective Salem. Nice one...
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
It's funny to see how impatient people are, and unwilling to learn by experimentation.
That while loop will never stop. If it executes at all.