1) b/c C is a minimal, spartan like language
2) shift each bit out and test it:
unsigned int num = 0xdeadbeef;
for(int x = 0; x < (sizeof(int) * 8); x++)
if(num & (1 << x) ) printf("bit %d is on\n", x);
3)using the `stringification' operator in a preprocessor macro:
#define(func2call) #func2call()
4)by passing some arguments by reference, or by returning a structure packed full of stuff
5)by using execve() or CreateProcess()
6)by dereferencing a p ointer to that address
7)the only limit on dynamically allocated memory is the size of ur RAM i believe
8)see above
9)by using the readdir() function
9)by suing the setrlimit() function in linux
10)looks fine to me
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
that's not what 'nested' functions means. nested functions means being able to define a function inside another. and some compilers allow and others dont, so it's not something u can rely on.
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
ummm... are we sure this is an interview? This sounds more like a homework assignment to me... Who's doing the interviewing?
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
Infamous, you have better things to do than waste your time doing someone else's homework.
samaru
a.k.a inscissor
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18
what am i, psychic? i didnt know if it was homework or not, i was just trying to clear up some of the old posts; worry about yourself. that post was almost 3 months old anyhow, dont think it helped him much if it was homework.
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2