First commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int n,i,j;
|
||||
int array[n];
|
||||
int *ptr = array;
|
||||
|
||||
|
||||
printf("Enter the size of the array: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
for(i=0;i<n;i++)
|
||||
{
|
||||
printf("Please enter the %d number: ",i+1);
|
||||
scanf("%d",(ptr+i));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(j=0;j<n;j++)
|
||||
{
|
||||
printf("The %d. number is %d \n",j+1,*(ptr+j));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user