online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <string.h> typedef struct player_main{ char name[20]; int total; } player; void print(player pprint); void scan(player *pscan); int main(){ player user[2]; for(int i = 0; i < 2; i++){// scanned printf("Player %d", i+1); scan(&(user[i])); } for(int i = 0; i < 2; i++){// printed print(user[i]); } return 0; } void print(player pprint){ printf("%s Weight:%d kg\n", pprint.name, pprint.total); } void scan(player *pscan){ printf("\nName: \n"); fgets(pscan->name, 20, stdin); pscan->name[strcspn(pscan->name, "\n")] = '\0'; printf("\nEnter weight:"); scanf("%d%*c", &(pscan->total)); }

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