User Tools

Site Tools


notes:c4eng:fall2024:projects:ptb1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:c4eng:fall2024:projects:ptb1 [2024/10/17 13:42] – [button] skephartnotes:c4eng:fall2024:projects:ptb1 [2024/10/21 23:12] (current) – [ARRAYS IN C] dprado
Line 28: Line 28:
 a data structure that allows you store multiple elements of the same data type in the same memory location. Arrays can contain many different date types and even other date structures. Once an array is initialized, it's size cannot be changed. However, you can change date elements at specific points in the array.  a data structure that allows you store multiple elements of the same data type in the same memory location. Arrays can contain many different date types and even other date structures. Once an array is initialized, it's size cannot be changed. However, you can change date elements at specific points in the array. 
  
-int numbers[5] = {1, 2, 3, 4, 5};  //declared and creates an array that contains 5 integers 1,2,3,4,5+     int numbers[5] = {1, 2, 3, 4, 5};  //declares and creates an array that contains 5 integers 1,2,3,4,5
  
-int thirdNumber = numbers[3];  //would access 3rd data element in the array, which would be 3 in this case.  +     int thirdNumber = numbers[3];  //access 3rd data element in the array, which would be 3 in this case.  
  
  
  
notes/c4eng/fall2024/projects/ptb1.1729172531.txt.gz · Last modified: 2024/10/17 13:42 by skephart