Pointer | Array |
1. A pointer is a place in memory that keeps address of another place inside
|
1. An array is a single, pre allocated chunk of contiguous elements (all of the same type), fixed in size and location.
|
2. Pointer can’t be initialized at definition.
|
2. Array can be initialized at definition. Example
int num[] = { 2, 4, 5}
|
3. Pointer is dynamic in nature. The memory allocation can be resized or freed later.
|
3. They are static in nature. Once memory is allocated , it cannot be resized or freed dynamically.
|
4. The assembly code of Pointer is different than Array
|
4. The assembly code of Array is different than Pointer.
|
Java Strut,hibernate tutorial,best java example with source code,android tutorial,android interview question,iPhone all example,all c languages example,c languages project with source code,iPhone and android project free download.
Tuesday, 12 February 2013
Difference between array and pointer in C/C++
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Comment