0

Hi guys,

This may well have been covered in another post and, if so, feel free to direct me to that one. Also, I hope that I am in the correct section!

I am approaching the end of my semester and face the upcoming exams. Obviously most of the work for computing is achieved by doing the homework throughout the semester and learning as you go, which I hasten to add I have done! However, I would also like to perform really well in the exam and demonstrate what I know. Therefore, my question has two parts:

1 - What strategies do you recommend in preparation for these kind of examinations? This may sound a little vague, but what I mean is: hardest topics first, last or mix it up? suggestions for breaking down the structure of a session. Also, any hints for good exam technique would be greatly appreciated, eg. do you do easy questions first or just standard order?

2 - I hope this is not an inappropriate question, but are there collections of questions to practise and, if so, is this ok? For example, things like: write an iterative function that finds the max value in an array, write a recursive function which does y. I would love to be able to just practise basic functions to really drill the concepts into my head.

Thanks very much for your time, guys. I hope that this sort of stuff is not a problem to ask. I really am just looking for pointers from people with experience.

Cheers

8
Contributors
18
Replies
19
Views
10 Years
Discussion Span
Last Post by hammerhead
Featured Replies
  • 1

    writing code on paper is little different from writing it on a computer when you get used to it. Maybe I'm getting old but it's how I actually learned programming. We used a mainframe and each student had a grand total of 5 minutes of computer time (CPU time that … Read More

0

Hi guys,

This may well have been covered in another post and, if so, feel free to direct me to that one. Also, I hope that I am in the correct section!

I am approaching the end of my semester and face the upcoming exams. Obviously most of the work for computing is achieved by doing the homework throughout the semester and learning as you go, which I hasten to add I have done! However, I would also like to perform really well in the exam and demonstrate what I know. Therefore, my question has two parts:

1 - What strategies do you recommend in preparation for these kind of examinations? This may sound a little vague, but what I mean is: hardest topics first, last or mix it up? suggestions for breaking down the structure of a session. Also, any hints for good exam technique would be greatly appreciated, eg. do you do easy questions first or just standard order?

2 - I hope this is not an inappropriate question, but are there collections of questions to practise and, if so, is this ok? For example, things like: write an iterative function that finds the max value in an array, write a recursive function which does y. I would love to be able to just practise basic functions to really drill the concepts into my head.

Thanks very much for your time, guys. I hope that this sort of stuff is not a problem to ask. I really am just looking for pointers from people with experience.

Cheers

Here are some questions for you to answer--


"What is the difference between a constant pointer and a pointer to a constant? Write out the syntax for both and then write a block comment with information about each types functionality."

"Write a Structure named BASE_STRUCT and another structure named DERIVED_STRUCT where DERIVED_STRUCT is a polymorphic object that inherits information from BASE_STRUCT"

"What is the difference between a Union, Struct and Class?"

"True or False: A Pointer is an Array, but an Array is not a Pointer."

"True or False: NULL and 0 have the exact same functionality when assigning a pointers address to either."

"True or False: You can change the address pointed by a constant pointer but cannot change the address pointed by a pointer to a constant."

0

Multiple Choice: What is the value of the pointer after this syntax--

int array[] = {10, 20, -10, -20, 5}, *p = array;
p = &p[2];
array[1] = 5;
p++;

A) 10
B) 20
C) -10
D) -20
E) 5

-------------------

Multiple Choice: What is the difference between--
// information about pointers int x[] = {1, 2}, y[] = {3, 4}, *p = x, *q = y;

*p++ = *q++;
p++ = q++;

A) The first line increments the values and copies the values from q to p whereas the second line increments the addresses and assigns the address of q to p

B) The first line copies the values from q to p then increments the address whereas the second line assigns the address of q to p and then increments the address pointed by both pointers.

C) The first line increments the addresses and copies the values from q to p whereas the second line increments the addresses and assigns the address of q to p

D) The first line assigns the value of q to p then increments the values of q and p whereas the second line assigns the address of q to p then increments the address pointed by both pointers.

E) There is no difference

0

its so hard to guide you on how to best prepare becasue we dont know what the focus of material was, and we dont know which aspects the professor deems to be more/less important.

make sure you understand the whys and wherefores of all the problems in previous assignments.

Generally speaking, i would definitely hit up the TA's or whatever the assistants/graders are called at your school. if theres any sort of "practice exam" available, DO THAT. check the library if there are some sort of "course reserves" and the course online repository for old exams. finding a study group to join, if not too late .... Sorry if these are generic suggestions, but honestly, it's how i got through engineering school.

the things that Alex posted above are good general problems, but may not be the best use of your preparation time. Unfortunately, there's just no way for any of us here to tell.

good luck.

.

0

I read in another one of your posts that you are a "first year" student, if I recall correctly. Alex raises some good questions, but I think they may be a bit more advanced than "first year". At least they were at my school (CSU system). Maybe some of the people here went to other schools where they taught that earlier (flame war, anyone? :) ). Ditto what jephthah said. Every professor is different and they test differently. Tailor it to their priorities. I've had 100% essay question tests with no coding like Alex's questions and vice versa.

0

Thanks very much guys. Some of the questions posed are quite advanced (for me, anyways!), however, I will research them and generate some code to better understand some of these rather subtle distinctions. I am not really familiar with the idea of incrementing pointers so I look forward to an extended session working that one out!

Can I just say how great this site is and how much I have appreciated the help provided by people, which has been really fantastic. As an aspiring programmer, it is really great to have somewhere to turn when I hit a brick wall! Thanks again.

Kind regards,

Daniel

0

Hey Interesting Questions above. But i was wondering how do i do that polymorphic structs for this question,

Write a Structure named BASE_STRUCT and another structure named DERIVED_STRUCT where DERIVED_STRUCT is a polymorphic object that inherits information from BASE_STRUCT"

Should we actually write a constructor For Base_struct and then write some code like this.

struct Base_Struct
{
int a;
int b;
string c;
Base_Struct()
{
new Derieved_Struct s;
s.a=a;
s.b=b;
s.c=s;
};
}
0

Multiple Choice: What is the value of the pointer after this syntax--

int array[] = {10, 20, -10, -20, 5}, *p = array;
p = &p[2];
array[1] = 5;
p++;

A) 10
B) 20
C) -10
D) -20
E) 5

-------------------

Multiple Choice: What is the difference between--
// information about pointers int x[] = {1, 2}, y[] = {3, 4}, *p = x, *q = y;

*p++ = *q++;
p++ = q++;

A) The first line increments the values and copies the values from q to p whereas the second line increments the addresses and assigns the address of q to p

B) The first line copies the values from q to p then increments the address whereas the second line assigns the address of q to p and then increments the address pointed by both pointers.

C) The first line increments the addresses and copies the values from q to p whereas the second line increments the addresses and assigns the address of q to p

D) The first line assigns the value of q to p then increments the values of q and p whereas the second line assigns the address of q to p then increments the address pointed by both pointers.

E) There is no difference

Answer to first homework is D , p points to 4th element of the array.

0

Hey Interesting Questions above. But i was wondering how do i do that polymorphic structs for this question,

Should we actually write a constructor For Base_struct and then write some code like this.

struct Base_Struct
{
int a;
int b;
string c;
Base_Struct()
{
new Derieved_Struct s;
s.a=a;
s.b=b;
s.c=s;
};
}

Inheritance implies that an object inherits information (was derived from) another object.

struct BASE
{
};

struct DERIVED : public BASE
{
};

Here DERIVED inherits the data of BASE (in a sense, it IS-A BASE) so you can do something like...

DERIVED der;
BASE *bPtr = &der;

which is perfectly legal because it makes sense. DERIVED has data of BASE and BASE is publically accessible.

In order to fulfill polymorphism, BASE must contain at least one virtual function to make BASE (and then therefore make DERIVED which contains data of BASE) be polymorphic.


Answer to question:

struct BASE
{
      public:
              virtual ~BASE(){};
};

struct DERIVED : public BASE
{
};
0

whatever happened to actually learning and understanding what you're supposed to know rather than waiting for the last minute to cram for the exam?

0

whatever happened to actually learning and understanding what you're supposed to know rather than waiting for the last minute to cram for the exam?

really? last minute cramming is the tried and true method. I'm quite sure it pre-dates the Neolithic Era. At any rate, it's how i got my degree :P


.

0

Hi jwenting,

Most of the action on this thread, which I started, has been from other more experienced people who have posed questions. However, I really want to answer your question as I heartily agree with your sentiment. My real focus has been on how to perform in an exam. I am actually an avid programmer, albeit in the early stages of my career, and I really enjoy the material! I have worked really hard and I think I will do well. However, I find that I consistently underperform in exams for two reasons:

1 - I think exam conditions really affect my ability to think.
2 - Writing code on paper is so different to the process of working on a computer - where you compile, find errors and then try again until you get it right - that I believe I really don't demonstrate what I know.

As a result, I have really wanted to go in and show what I know. So, in answer to your question, I heartily agree that learning and understanding is what it is all about, however, due to the artificial nature of the examination, it sometimes helps to prepare for that process itself. Your reputation and number of posts speak for itself, so I humbly submit that I am a first year who wants to perform as well as possible in an exam environment. Thanks for your time in reading the thread anyway.

Kind regards,

Daniel

1

writing code on paper is little different from writing it on a computer when you get used to it.
Maybe I'm getting old but it's how I actually learned programming. We used a mainframe and each student had a grand total of 5 minutes of computer time (CPU time that is) for the entire semester, so we'd better make darn sure that our code worked before we started to type it in.

And that's what it all comes down to, practice. There's no substitute for experience in this, and trying to find shortcuts isn't going to work very well.

As to your first point, I recognise myself in that. You're nervous, in unfamiliar surroundings, and that questionaire can determine your future. Not the best situation to give peak performance, and it usually shows in my results (job interviews are just the same).
But there too experience works. Do a lot of practice exams.
And what also works is to try and be as relaxed as you can for the exam. Don't drink alcohol or eat high-caloric food in the day or days leading up to the exam. Some people suggest yoga to help clear the mind (I've not tried this).
If your path to the exam location suffers from severe traffic jams, try taking public transport. Plan your journey to arrive at least half an hour early, gives you some peace of mind in case of delays.
Drink water before you start, and do go to the toilet as well (nothing worse than getting uncomfortable halfway through :) ).

As you see most of that has nothing to do with the actual content of the exam, and will work just as well on any examination (or indeed job interview), as long as you are confident that you have what it takes to pass (and yes, the last several hours before the exam you WILL feel you know nothing at all, but if you actually do know it and can calm yourself it will come back when needed).

Cramming in fact will often make it worse. There are solid scientific reasons for that.
What cramming does is pump knowledge into shortterm memory without imprinting it in longterm memory.
What that means is that the knowledge will be there "at the top of your brain" for 24-48 hours after which it will be gone again.
That's not going to do you any good if you need more than 24 hours to learn for the exam, and quite apart from that will not leave you with a level of confidence in your skill.
Of course it also doesn't actually teach you anything, so that grade (if you pass) will be worthless as it won't reflect your actual knowledge.

Votes + Comments
Well said
0

What cramming does is pump knowledge into shortterm memory without imprinting it in longterm memory.
What that means is that the knowledge will be there "at the top of your brain" for 24-48 hours after which it will be gone again.

aha. so that's where my Signals and Systems class went...

0

Some colleges here have open book exams to discourage students from last minute cramming. A person can bring any number of books with him into the examination room. The questions however are such that only a person with complete understanding of the concepts is able to answer.

I would suggest you to get proper sleep the day before the examination. Some students have the habit of studying very late at night (till 2 or 3am) the night before. It only makes the matter worse. You will end up in the examination hall tired and will not be able to recollect much.

0

true.

i found that i often did my best when, even though I felt completely unprepared, i just said F- it and went to bed instead of pulling an all-nighter.

0

One of the most relaxed exam experiences I ever had was walking into that room and finding out that it was an exam I'd not specifically studied for.
I'd mixed up the dates of 2 exam sessions, the one I thought I was sitting was a month later, oops.

After the first few minutes of terror I resigned to the situation, decided to make the best of it, and completed the exam with time to spare.
Passed it too with a pretty nice score. Maybe not what I could have gotten without going over the material one last time in the days running up to it, but a good score nevertheless.

1

jwenting, thanks for the feedback and the pointers on general approaches to exams and interviews. That sort of advice is also great for interviews, as you say, so it could prove invaluable.

It's very interesting that you raise the issue of learning by writing and then, with limited time on a computer, having to rely totally on the correctness of your work beforehand. I can only speak for myself but, for me, one of the great attractions of programming has been the fact that persistence is (ultimately!) rewarded, ie. if you just keep going you will find that silly error. Furthermore, I find myself working through the problem as I develop the solution. As a result of this, I tip my hat to those of you who had to not only get all the syntax correct, but also be sure of the fact that the program was going to do exactly what you wanted!

The difference in being able to simply press compile: "Oops, missing a brace!" versus "Oh well, that's my CPU time gone!" is pretty incredible in our lifetimes. Perhaps, in this context, the discipline of having to work on paper is good for my development as a programmer!

0

My coding is done equally on paper and on the computer. Its much easier to do the math on paper before finally typing the program.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.