Answer:
Answers are attached to this response as source codes in a couple files
Explanation:
Explanation has been added to the codes in the attached files in form of comments.
Hope this helps!
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>
Answer:
Business law
Explanation:
Business law are the laws that includes how to start, manage, sell, close a business. They include state and federal laws and administrative regulations.
I hope you find this information useful and interesting! Good luck!
He wrote his first software program. That should be the answer. He was around the age 13, and the rest of what happened is history.
The program is:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct def_nodo
{char num[500];
struct def_nodo *izq, *der;
}Tiponodo;
void inserta(Tiponodo **insert, char i[]);
void borra(Tiponodo *p);
void imprime_orden(Tiponodo *p);
int main(void)
{
char nombre[500];
Tiponodo *raiz;
raiz=NULL;
do{printf("Give me the string you want: ");
__fpurge(stdin);
gets(nombre);
inserta(&raiz,nombre);
}while(strcmp(nombre,"*")!=0);
imprime_orden(raiz);
borra(raiz);
}
void inserta(Tiponodo **insert, char i[])//In this function we insert the new string in our tree
{Tiponodo *avanza, *nuevo;
avanza=*insert;
if((nuevo=(Tiponodo *)malloc(sizeof(Tiponodo)))==NULL)
{printf("no hay espacio libre");
exit(1);
}
strcpy(nuevo->num,i);
nuevo->izq=NULL;
nuevo->der=NULL;
while(avanza!=NULL)
{
if(strcmp(avanza->num,i)<0)
{if(avanza->der!=NULL)
avanza=avanza->der;
else
{avanza->der=nuevo;
return;
}
}
if(strcmp(avanza->num, i)>=0)
{if(avanza->izq!=NULL)
avanza=avanza->izq;
else
{avanza->izq=nuevo;
return;
}
}
}
avanza=nuevo;
*insert=avanza;
}
void imprime_orden(Tiponodo *p)//we use this function to print the tree
{if(p!=NULL)
{imprime_orden(p->izq);
printf("%s \n", p->num);
imprime_orden(p->der);
}
}
void borra(Tiponodo *p)//we use this function to delete the binary tree
{if(p!=NULL)
{borra(p->izq);
borra(p->der);
free(p);
}
}
Answer:
Explanation:
A ruler
;););););););););););););););)