C Program to Scan and Print Array
Write C Program to Scan and Print Array
// C Program to Scan and Print Array #include <stdio.h> int main() { int A[5]; int i; for(i = 0; i < 5; i++) { printf("Enter Element - %d :--> ", i + 1); scanf("%d", &A[i]); } printf("\nYour Array : --> "); for(i = 0; i < 5; i++) { printf("%d ",A[i]); } return 0; }
Output:
Enter Element - 1 :--> 22
Enter Element - 2 :--> 33
Enter Element - 3 :--> 55
Enter Element - 4 :--> 11
Enter Element - 5 :--> 44
Your Array : --> 22 33 55 11 44