Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Declaring and initializing arrays
#1
Arrays are collections of elements of the same data type.

// Declaring an array of integers
int numbers[5];

// Initializing an array with values
int primes[5] = {2, 3, 5, 7, 11};
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not initializing variables in C Qomplainerz 0 226 07-26-2023, 07:07 AM
Last Post: Qomplainerz
  Multi-dimensional arrays in C Qomplainerz 0 265 07-25-2023, 11:40 AM
Last Post: Qomplainerz
  Declaring and defining functions in C Qomplainerz 0 294 07-25-2023, 11:01 AM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 7 Guest(s)