Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does (int*) mean in C language?
What does (int*) mean in C language?
Int* means to define a variable of type Int*, that is, a pointer variable of type int.

Int stands for basic data type (integer);

* Represents a pointer operator.

Examples are as follows:

int? a[]={ 1,2,3,4,5 }; //? Define an array of type int, which contains 5 elements.

int*? p2 = a; ? //? Define an int pointer variable p 1 to point to the first address of array a.

int*? p2 =(int *)malloc(sizeof(int)); ? //? Define an int pointer variable p2, which points to an address unit with four consecutive bytes in memory.