An interviewer who thinks he is being clever might present you with a code sample like the following and ask you what the output would be:
//C
#include <stdio.h>
void dosomething(int i, int j, int k, int l)
{
printf("%d, %d, %d, %d\n", i,j,k,l);
}
int main(int argc, char **argv)
{
int i =1;
dosomething(i++, ++i, i++, ++i);
i = 1;
printf("%d\n", i++ + ++i + i++ + ++i);
i = 1;
printf("%d\n", (i++) + (++i) + (i++) + (++i));
}
Recent comments
2 days 11 hours ago
2 days 11 hours ago
3 days 7 hours ago
1 week 1 day ago
1 week 1 day ago
2 weeks 22 hours ago
9 weeks 3 days ago
13 weeks 4 days ago
16 weeks 2 days ago
16 weeks 4 days ago