| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
True or false
1) Which of these assignments are correct? If they are wrong, why?
int a[5]; int b[6]; a = b; *a = b; *a = *b; a = *b; 2) Which of these assignments are correct? If they are wrong, why? int a[5]; int *b; b = a; *b = a; b = *a; *b = *a; a = b; *a = *b; a = *b; *a = b; |
|
#2
|
||||
|
||||
|
You kind of double posted this, and it does definitely not belong in the java forum, for Java doesn't have pointers (at least, it doesn't make any distinction between one or the other)
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 280
![]() |
|
#3
|
||||
|
||||
|
I've moved this to the C/C++ forum... if it's a double post, one should be removed.
jandali, can you give us a little more context around the question? without the surrounding code and any potential errors, it just sounds like you're asking us to do your homework. Your best bet to test which ones are right and wrong (if you can't figure out by looking) is to simply compile the code and see what happens. ;-)
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
|
#4
|
|||
|
|||
|
Quote:
no it was just question i was doing for studying for midterm. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > True or false |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|