Online Programming Server

Login

Login with facebook [?]

Facebook

Tutorial 75: Chapter 3 - Array & Pointer

You are here: Tutorials >> Basic >> C >> C Programming Basics >> Chapter 3 - Array & Pointer

Tutorial ID75
TitleChapter 3 - Array & Pointer

Array

—
  • An array is a consecutive collection of data of the same data type
  • In C, the data in an array are guaranteed to be lay in consecutive memory with preserved order
  • —
  • To declare a 1-d array
  • type identifier[size] = { data1, data2, data3, ... };
  • —
  • To declare a multi-dimensional array
  • type identifier[size1][size2][...]
    = { { data1, ... }, { data2, ... }, {data3, ...},
    { ... }, ... };

Post Your Comment

Title
Message