0
What is deffent between interger and array?
In c programing
3 Respuestas
+ 3
An integer is a single numerical value without decimal places, like 5, 2314 or -894.
An array is a collection of several values of the same type. For example an array of three integers might look like this: int arr[] = {5, 2314, -894};
Instead of a defining multiple variables like this:
int var1 = 5;
int var2 = 2314;
int var3 = -894;
it's usually easier and more efficient to create an array, especially if you need dozens, hundreds or thousands of variables of the same type.
+ 2
I'm probably guessing you want the difference between them.
An integer is a primitive datatype, but an array isn't. An array can hold any kind of datatype, for example int, char...
An integer can only store whole numbers
0
Oh thanks