Array Of Pointers

3,588 views 6 slides Nov 19, 2017
Slide 1
Slide 1 of 6
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6

About This Presentation

Array,Pointers,Array Of Pointers


Slide Content

Class Presentation Array Of Pointers Submitted By- Sharad Dubey Submitted To- Prof . Nitin Paharia Sir

Array A collection of homogeneous data items that are stored at contiguous memory locations. Syntax of declaring Array Variable :- data_type variable_name [size] Example: - float s_height[40]; Syntax of accessing array elements:- variable_name [index] Example : - s_height[3]=5.4; sum=sum+s_height[3];

Pointer A pointer is a variable that can hold the address of another variable. Syntax of declaring pointer variable :- data_type*variable_name Example :- int*a ; char*a ; Where,* is used to denote that “a” is pointer variable and not a normal variable.

Array Of Pointers Array Of Pointers is a linear consecutive sequence of memory locations each of which represents a pointer. We can assign pointers as an Array Of Pointer with the following syntax- data_type *pointer_name[size] Example :- int*ptr[10]; Here, ptr refers to an array of 10 pointers.

Example Output:-
Tags