Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Array Incrementing by 1
#include <stdio.h> int main(){ int array1[10]={1,2,3,4,5,6,5,4,3,2}; int array2[10]={10,20,30,40,50,60,70,80,90,100}; for (int i=0; i<10; i++){ printf("Array1 %d before the increment is %d ", i, array1[i]); printf("Array2 %d before the increment is %d\n", i, array2[i]); array1[i]++; array2[i]++; } printf("\n"); for (int i=0; i<10; i++){ printf("Array1 %d after the increment is %d ", i, array1[i]); printf("Array2 %d after the increment is %d\n", i, array2[i]); } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Hello, World
variable number of arguments
Why &(a+1) is not allowed
150116_PrimoFactorial
MatrixMul_shortxshort
purple ghost red orange blue skulls
Lab 9 v0.8
fork
fgets and basic string manipulation
Cuenta codigos
Please log in to post a comment.