The code you have posted won't work because the first line should be
#include <iostream> instead of just #include. Assuming that the first line
is actually a typo: the answer is A because in F1 you send the data by value
and in F2 you send it by reference.
And if I am correctly understanding you... are you trying to say that if you
declare void F1(int a, int b); then you must define it as void F1(int a, int
b) { //Stuff }?
I haven't coded in C/C++ in ages but as far as I can recall you don't (You
can see in this case as well). It probably does make sense to do it though.
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-code/-/36PPMZbIzlMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.