Example of modifying the value of an element in an array in C

‮ual.www‬tturi.com
Example of modifying the value of an element in an array in C
/*
C language Example: Change the value of element in array  
*/

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int data[4] = {1,3,5,7,10};

    data[2] = 11;
    data[4] = 13;

    for(int i=0;i<5;i++)
        printf("%d \n",data[i]);

    return 0;
}
Created Time:2017-08-28 08:57:09  Author:lautturi