Wednesday, October 17, 2018

Pointers and Arrays

In this session I learned about Pointers and also Arrays, here are the purposes of each:

1. Pointer

Pointer is like to "point at" certain pointer-ed data. So it is a reference method in programming. If an operand is given pointer to a certain operand, each will change value once each value is changed. So the pointer gives a connection between two operands or more.

2. Array

Array is basically a set, set of data. Here is some examples,

Syntax:

char A[100];  //this initializes an array of char with size of 100
int B[100];  //this initializes an array of integers with size of 100

No comments:

Post a Comment