|
-
Mar 18th, 2002, 11:28 AM
#1
Thread Starter
Member
Pointer declaration and initialization
Hi,
I'm wondering what actually happens when you declare a pointer and initialize it on the same line.
Does it set the pointer's value or the value the pointer points to?
Which of the following is correct?
int *a = 1;
or
int *b = malloc(4);
Thanks,
Cedric
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|