Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Differentiate between array and pointer?

Differentiate between array and pointer?

Answers


caroline
Array
1.Array allocates space automatically
2.It cannot
be resized
3.It cannot be reassigned
4.size of (arrayname) gives the number of bytes occupied by the array.

Pointer
1.Explicitly assigned to point to an allocated space.
2.It can be sized using realloc()
3.pointer can be reassigned.
4.sizeof (p) returns the number of bytes used to store the pointer variable p.
carol1 answered the question on April 13, 2018 at 15:36

Answer Attachments

Exams With Marking Schemes

Related Questions