online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdlib.h> #include <stdio.h> typedef struct nd { int val; struct nd *next; } node; typedef node * Lista; void print_list(node*currnode) { printf("START -> "); while (currnode != NULL) { printf("%d -> ", currnode->val); currnode = currnode->next; } printf("END"); } //reimpilista means "buildlist" node*riempilista(Lista lis){ node *currentNode, *temp, *head; int i,n; printf("how many nodes?\n"); scanf("%d",&n); for (i = 0; i < n; i++) { currentNode = (node *)malloc(sizeof(node)); printf("Enter element %d : ", (i + 1)); scanf("%d", &currentNode->val); if (i == 0) { temp = currentNode; head = temp; } else { temp->next = currentNode; temp = currentNode; } } temp->next = NULL; return head; } int main(){ Lista listautente=NULL; listautente=riempilista(listautente); print_list(listautente); 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