# Thread: Website tutorials (Pointers quiz)

1. ## Website tutorials (Pointers quiz)

Hello all, I'm pretty new here, in fact, I'm as new as they get. I hope to become a more familiar face around here as time goes by, anyway, that's all off topic.

I'v been going through the tutorials on the main website (which is rediculously awesome, mad props for that), aswell as the quizes, which also really help a lot. Now I only started yesterday, so please excuse me for not having gotten all too far yet.

Anyway, I was working on the quiz regarding pointers (http://www.cprogramming.com/tutorial/quiz/quiz6.html)

And I found that when you click the "Anwser key" button, question 3 is different going from the question to the anwser.

I'm guessing this is just a small error, and I'm not at all sure if I should be posting it in this forum. Though I did figure it would be useful to post, or atleast let the right people know.

As I mentioned, there are two ways to use the pointer to access information: it is possible to have it give the actual address to another variable. To do so, simply use the name of the pointer without the *.
That was from the tutorial you gave the link to.

3. Originally Posted by beene

That was from the tutorial you gave the link to.
The problem is more so that the "question" goes from:
3. Which of the following gives the memory address of a variable pointed to by pointer a?
To:

3. Which of the following gives the memory address of a pointer a?
For the above, my guess would be "a;", the lower should be "&a;", am I still right there?
(the problem is that the questions are different, but shouldnt be)

4. It doesn't matter, it will still give the same result.

The memory address that the pointer holds is the same as the pointers memory address.

So...
Code:
```int *p;
int a;
p = &a;
cout << *p;
cout << a;```
...give out the same result.

I hope i understood your post right.

5. 3. Which of the following gives the memory address of a pointer a?
This is indeed somewhat ambiguous. I'd interpret it like the OP, as &a, i.e. the address of the pointer variable, not the address the pointer variable holds.

6. Originally Posted by beene
It doesn't matter, it will still give the same result.

The memory address that the pointer holds is the same as the pointers memory address.

So...
Code:
```int *p;
int a;
p = &a;
cout << *p;
cout << a;```
...give out the same result.

I hope i understood your post right.
Correct me if I'm wrong, but pointers do not only store memory addresses, but are also stored at a memory address, so reading the question the way it's writting in the "shorter" form (The way it's given when you click the anwser key link), they're asking for the address of the pointer, not for the address stored within the pointer. Which should be &a;, either way, I don't know who created the tutorials and quiz's (whoever did significantly rocks), but the problem should still be fixed.

7. I've noticed several discreprencies between the quizes and the answers. The only one I can remember at the moment is that one of the questions starts with "Spell Stroustroup. Just kidding." whereas the question in the answers, if you know what I mean, does not.