Skip to content
Snippets Groups Projects
Commit 7d12a2b5 authored by goldman09's avatar goldman09
Browse files

Hauptprogramm zum Baum

parent 9645030a
No related branches found
No related tags found
No related merge requests found
prog.c 0 → 100644
#include <stdio.h>
#include <stdlib.h>
#include "tree.h"
int main () {
int a = 25;
int* q = &a;
int* p;
int array [] = {4,8,3,7,11,42,36,29};
struct tree_node root = { // Dummy-Knoten
.val = q,
.left = NULL,
.right = NULL,
};
for (int i = 0; i < 8; ++i) // alle Elemente des Arrays werden in den Baum eingefügt
{
p = &array[i];
t_insert(&root,p);
}
t_print(&root);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment