[Previous Homework]
[Next Homework]
Write a program that does the following:
From Linux on the GL machine:
Make sure that you follow all the coding standards
hw16 - Arrays 1
Write a program that does the following:
-
Defines the size of an array
In main()
-
Declare an array of integers with the number of elements defined by the size above
Initialize each element of the array to it's index number
Print out the the element name and value for each element in the array
-
For example: Value of myarray[1] is 1.
From Linux on the GL machine:
-
Compile the program:
gcc -o array1 array1.c
Run the program to make sure it works:
./array1
Use the SUBMIT utility turn in the homework.
submit cs104_grasso hw16 array1.c array1
Reference Programs :
Make sure that you follow all the coding standards