Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - I would like to ask C language how to input multiple data in an integer variable without array form, because I don't know how much data the user will input.
I would like to ask C language how to input multiple data in an integer variable without array form, because I don't know how much data the user will input.
Two methods:

First, the pointer

int * p;

int I;

for(I = 1; I < = 3; i++)

{

*(p++)= I;

}

Finally, put the values 1, 2,3 into the p pointer.

Second:

If you don't use pointers, you must use arrays.