main.c #include #include #define C_ARRAY_LEN 20 char **store_in_arry(char **storage, long length, char *newitem); char **delete_from_array(char **storage, long length, long delete_index); void sort(char **storage, long length, long sort_type); long ascending(char *string1, char* string2); long descending(char *string1, char* string2); long *alloc_number(long size); void free_number(long *mem); void print(long *mem, long size); long *change_size(long *mem, long old_size, long new_size); long add(long *a, long size1, long *b, long size2, long *c, long size3); int main() { char **test=0; char in[C_ARRAY_LEN]; char arr1[C_ARRAY_LEN]="Hallo ", arr2[C_ARRAY_LEN]="Welt"; char arr3[C_ARRAY_LEN]="1234 ", arr4[C_ARRAY_LEN]="Test"; long len=0, length=0, i=0, choice=0, len1=10, len2=10, len3=10, added; //long *arr_num=0, *arr1=0, *arr2=0, *arr3=0; /* do{ printf("\nWas wollen Sie tun?\n"); printf("0... Exit\n"); printf("1... Speicher reservieren\n"); printf("2... Speicher freigeben\n"); printf("3... Speicher ausgeben\n"); printf("4... Initialisieren\n"); printf("5... Speicher verdoppeln\n"); scanf("%ld", &choice); getchar(); switch(choice){ case 1: len=10; arr_num=alloc_number(len); break; case 2: free_number(arr_num); arr_num=0; break; case 3: print(arr_num, len); break; case 4: for(i=0;i=size1&&size3>=size2) { if(size1<=size2) len=size1; else len=size2; for(i=0;iold_size) { for(i=old_size;i(length-1)) { printf("Index nicht im Feldbereich!"); return storage; }else{ for(i=delete_index;i0; j=j-1) { for(i=0; ifeld[i+1]) { h=storage[i]; storage[i]=storage[i+1]; storage[i+1]=h; } } } } long ascending(char *string1, char* string2) { if(strcmp(string1, string2)>0) return 1; else return 0; } long descending(char *string1, char* string2) { if(strcmp(string1, string2)<0) return 1; else return 0; }