online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include <stdlib.h> #define TAM 5 void preenchendoVetor(int v[TAM]){ //2) De tal forma que podemos altera-lo em outra função sem precisar retorna nada for(int i = 0; i < TAM ; i++){ scanf("%d", &v[i]); } } int main(){ int vetor[TAM]; preenchendoVetor(vetor); //1) Não está sendo passado um cópia do vetor, mas sim o endereço dele printf("\n\n\n"); for(int i = 0; i < TAM; i++){ printf("%d\n", vetor[i]); } // Lembrando que em c isso só funciona com vetores se passar uma variavel normal ex int num como argumento // vai tá passando uma cópia dela e não por referência. (para passar por referência user os ponteiros) return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue