Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

changing an item in an array in c

#include <stdio.h>
#define PI 3.142
int main(){
    int a[5] ={12, 21, 34, 23, 13};
    printf("Initial value of index 1: %d
", a[1]);
    a[1] = 43;
    printf("Final value of index 1: %d
", a[1]);
    
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #changing #item #array
ADD COMMENT
Topic
Name
9+3 =