SpiralFlex
Well-Known Member
- Joined
- Dec 18, 2010
- Messages
- 6,960
- Gender
- Female
- HSC
- N/A
Lol this was the same question we got when I did COMP last year.
It is from last year, semester 1 paper. Richard has just released it.Lol this was the same question we got when I did COMP last year.
I was told this question popped up then someone posted up a hitler vid going "nein, nein,..." in the forums section then Buckland replied to it and everyone lol'ed.AD:
=== Question 9 ===
(4 Marks)
When the following code is compiled and executed it eventually executes
the printf and terminates. What value does it print?
#include <stdio.h>
#define NINE 9
int nine (int Nein);
int nein (int nein);
int main (int argc, char *argv[]) {
...int Nine = 3;
...printf ("%d\n", nine (Nine));
...return !NINE;
}
int nein (int nein) {
...return ( !(nein == ((NINE*nein) % NINE)) );
}
int nine (int Nein) {
...int Nine = NINE;
...while (nein (Nine)) {
......Nine += Nein;
......Nine = Nine % NINE;
...}
...return Nine;
}
After having done a full semester of computing, this question is just lol.AD:
=== Question 9 ===
(4 Marks)
When the following code is compiled and executed it eventually executes
the printf and terminates. What value does it print?
#include <stdio.h>
#define NINE 9
int nine (int Nein);
int nein (int nein);
int main (int argc, char *argv[]) {
...int Nine = 3;
...printf ("%d\n", nine (Nine));
...return !NINE;
}
int nein (int nein) {
...return ( !(nein == ((NINE*nein) % NINE)) );
}
int nine (int Nein) {
...int Nine = NINE;
...while (nein (Nine)) {
......Nine += Nein;
......Nine = Nine % NINE;
...}
...return Nine;
}
HAHAHAHA yehAfter having done a full semester of computing, this question is just lol.
Output is just 9.
You're not alonegonna fail my comp1927
how'd u go bro? i think i smashed the theory, but got rekd by the pracsYou're not alone
got bum raped in both sectionshow'd u go bro? i think i smashed the theory, but got rekd by the pracs
you can enroll then if you passed just drop it before the census datethats depressing..are we allowed to enrol into the summer course..even though we don't know if we failed the course yet? cause the summer term seems to start on the 1st of december..while the results wont come out til the 5th?
blgot bum raped in both sections
there might be a chance they allow you to sit the supp, according to the conditions here http://www.cse.unsw.edu.au/~cs1927/14s2/lecs/week12tue/slide031.htmlthe prac was fucked...gonna fail 1927..
looks like there's some hope...only if my mark assessment was greater than 40..there might be a chance they allow you to sit the supp, according to the conditions here http://www.cse.unsw.edu.au/~cs1927/14s2/lecs/week12tue/slide031.html
If you feel that worried and worse comes to worse then if you want to repeat in the summer, enrol in it now and drop before the census date if you passed. I guess its better to prepare for the worst just in case.looks like there's some hope...only if my mark assessment was greater than 40..