Array program in C language || C programming examples || Array program

Array program in C language

#include <stdio.h>
 
main() 
{
    int array[100], n, c;
 
    printf("Enter the number of elements in array\n");
    scanf("%d", &n);
 
    printf("Enter %d elements\n", n);
 
    for ( c = 0 ; c < n ; c++ ) 
        scanf("%d", &array[c]);
 
    printf("Array elements entered by you are:\n");
 
    for ( c = 0 ; c < n ; c++ ) 
        printf("array[%d] = %d\n", c, array[c]);
 
    return 0;
}
Share this Post Share to Facebook Share to Twitter Email This Pin This Share on Google Plus Share on Tumblr join on whatsapp

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment