online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct snode { char *car_vendor; // Марка а/м char *car_model; // Модель а/м int car_year; // Год производства char *car_id ; // Номерной знак а/м char *key; int carrying; // Грузоподъемность (кг) int axles; // переднеприводная и задняприводная 6 на 4 - 4 ведущих struct snode* ptr; // указатель на следующий элемент }tnode; int push_back(char* vendor, char* model, int year, char* id, char* divise, int carry, int ax, tnode **node) { tnode* temp; if (!(*node)) { *node = calloc(1, sizeof(tnode)); (*node)->car_vendor = vendor; (*node)->car_model = model; (*node)->car_year = year; (*node)->key = divise; (*node)->car_id = id; (*node)->carrying = carry; (*node)->axles = ax; //(*node)->ptr = NULL; } //использование указателя на неполный тип класса struct list не допускается else { temp = *node; while (temp->ptr != NULL) temp = temp->ptr; temp->ptr = calloc(1, sizeof(tnode)); temp->ptr->car_vendor = vendor; temp->ptr->car_model = model; temp->ptr->car_year = year; temp->key = divise; temp->ptr->car_id = id; temp->ptr->carrying = carry; temp->ptr->axles = ax; } return 0; } void print_list(tnode* lst) { tnode* p = lst; while (p != NULL) { printf("vendor: %s model: %s year: %d key: %s id: %s carrying: %d axles: %d", p->car_vendor, p->car_model, p->car_year, p->key,p->car_id, p->carrying, p->axles); printf("\n"); p = p->ptr; } } int main() { tnode* list = NULL; push_back("reno", "light", 2003, "A123AA", "cam_radio", 300, 2, &list); push_back("bmw", "dark", 2003, "A125DD", "gps", 300, 2, &list); print_list(list); 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