Create an arbitrarily sized array in a for loop.
Arrays in C.
Date Created:Wednesday March 07th, 2007 07:02 AM
Date Modified:Monday December 01st, 2008 02:18 PM
#include <stdio.h>
int main() {
printf("Enter the number of notes:");
scanf("%d",&num);
printf("Enter an array");
for (i = 0; i<num;i++)
{
printf("Value %d: ",i);
scanf("%d",&array[i]);
}
for(i = 0; i < 12; i++) printf("%d\n", array[i] );
return 0;
}
Downloads:
Download: array.c 281 B
Please login or Click Here to register for downloads
Dynamic Arrays by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
