Create array of 100 integers - C Array

C examples for Array:Introduction

Description

Create array of 100 integers

Demo Code

#include <stdio.h>

int main(void)
{
   int x[100]; /* this declares a 100-integer array */
   int t;/*from   www.jav a2s . com*/

   /* load x with values 0 through 99 */
   for (t = 0; t<100; ++t) x[t] = t;

   /* display contents of x */
   for (t = 0; t<100; ++t) printf("%d ", x[t]);

   return 0;
}

Result


Related Tutorials