Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Array Incrementing by 1
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#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; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion