//Example of 1D(one dimensional) array
#include<stdio.h>
int main()
{
int stu[30],i,k; //dataType arrayName[size/number of element];
for(i=0 , k=3; i<=30 ; i++,k+=3)
{
//scanf("%d",&stu[0]);
stu[i] = k;
}
for(i=0 ; i<=30 ; i++)
{
printf("stu[%d] = %d\n",i,stu[i]);
}
return 0;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.