Well, i would think that p = p + 1makes the pointer invalid, this the output
-----
tal2 17
16 tal3
??? 17
------
here my ?? means, that i don't know what comes there.
Type: Posts; User: lesodk
Well, i would think that p = p + 1makes the pointer invalid, this the output
-----
tal2 17
16 tal3
??? 17
------
here my ?? means, that i don't know what comes there.
Okay. I would think that only the first one is correct, since a pointer to a base class can be assigned to a pointer to a derived class. The subsequent questions are illegal because the field "speed"...
And NO i don't have a c++ compiler. I can't install anything on this machine. However, i am also more interested in the explanation.
Hey, this has nothing to do with my homework. I have an exam tomorrow and these question are from a exam-set from a earlier year. The solutions are not explained, thus my question here. And as you...
I have the follow question
http://img41.imageshack.us/img41/5318/94404328.jpg
can anyone explain the answer to me.
I'm not sure what is correct.
i can't do it from my computer. I just thought that it would be very easy to answer the question.
Thanks!
Can anyone tell me what the output of this code is suppose to be?
It is from a test exam
int tal2= 15;
int tal3= 17;
int * p = &tal2;
int * q = &tal3;
cout <<tal2 <<" " << *q <<endl;
Thanks alot!
If i run this code
--------------------------------------
#include <iostream>
using namespace std;
char string1[5];
char string2[6];
char string3[7];