if we declare: int a[4][3]; then a[i][j] is equalivent to:
1. *(a[i]+j)
2. *(&a[0][0]+4*i+j)
3. Both 1 and 2
4. none of the above.
Please assist in this question
if we declare: int a[4][3]; then a[i][j] is equalivent to:
1. *(a[i]+j)
2. *(&a[0][0]+4*i+j)
3. Both 1 and 2
4. none of the above.
Please assist in this question
Could any expert kindly assist? Or should i say the question is too hard to the experts over here?
Read about the homework policy. It does not take an expert to answer your question correctly.Originally Posted by guoer
Take this as an unofficial warning: do not try emotional blackmail by implying that if we do not spoonfeed you the answer, we must be incompetent.
Last edited by laserlight; 02-27-2009 at 05:02 AM. Reason: Might as well delete pic-o-matic's post since matsp has a better and yet non-obvious answer.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
No, it is a case of : You figure out what it does, and then we can either EXPLAIN why it is that way, or tell you where you went wrong, if you get it wrong. It is not "ask a question and get the answer", when the actual purpose of the question itself is that you should learn something.
And just so that we can rule out that I'm waiting for your input to know the answer, here's the answer encrypted:
Where n is the question number, x = correct answer:
--Code:x = (8 >> (n+2));
Mats
Last edited by matsp; 02-27-2009 at 05:00 AM.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.