Question: This is a C Programming sample project from the data structures course. Can you explain what the codes I drew in yellow on the codes

 This is a C Programming sample project from the data structurescourse. Can you explain what the codes I drew in yellow onthe codes do? Please do not copy and paste. #include #include #include#define MAXS 20 int front = 0, rear= -1, top=-1; struct Node

This is a C Programming sample project from the data structures course. Can you explain what the codes I drew in yellow on the codes do? Please do not copy and paste.

#include #include #include #define MAXS 20 int front = 0, rear= -1, top=-1; struct Node { char car[20]; // Arabann aminin karakter dizisi struct Node *ptr; //Smaki dm teren pointer and int n; // Kawa tenan awala sa struct stackl{ //Satatan an stack uddanud char soldCar [20]; // Sawan mahaman at makanmak iin Kanakan di bawah }; struct stackl sold[20]; struct Node *insCar (struct Node *head) //wwwten binnen struct Node *NewNode; //Node duim wadu. struct Node *temp; //Temp during and temp = head; // Twin bana ne eden temp NewNode = (struct Node*) malloc(sizeof (struct Node)); // Mantas Wawanan binh driin Rawatwama- if (NewNode == NULL) // Mantas berak oluturamazsa printf("Uzgunuz Malloc Calismadi. "); } printf ("Araba Markalari Giriniz : "); // Amahaman marka adat ek in mesai vandhan scanf("%s", (NewNode->car)); // Amala achana wadhimiz ve printf("Ka arabaniz var : ", NewNode->car); //azda markadaki ha a las personit vaadhi scanf("%d", & (NewNode->n)); // Araba sa awidinis van printf(" "); NewNode->ptr = NULL; if (temp == NULL) //Ezan dute, bana temp'in bana atawan { head NewNode; } else { It has done witamin sonuna temp atawa while (temp->ptr != NULL) temp = temp->ptr; temp->ptr = NewNode; } return head; void push (char c[]) { strcpy(sold[++top) .solaCar,c); // Anahaya maten stack in inime - } void Buy (struct Node *head) // Pin anaka amak dwie trading { printf(" "); printf ("Mustezi $d : ", top+2); // Anka ada anak main men vad printf("Hangi arabayi satin almak istiyorsunuz : "); char costumerCar [20]; scanf("%s", costumerCar); // Amana marka werk in het tandan struct Node *temp; temp = head; while (strcmp (temp->car, costumerCar)) // Acaba sazna dana null inte biter. { temp = temp->ptr; if(temp == NULL) { break; } } if (temp NULL) // Kantona Sara yoksa printf("Girdiginiz araba markasi mevcut degildir. "); Buy (head); Jelse if(temp->n == 0) // Gaman Daha sana ne olursa { printf("Uzaunuz stokta istediginiz araba kalmadi. "); Buy (head); } else { (temp->n)--; // Kaman ako sa a. push(costumerCar); // Sawan Bahast saman makanan stack -> void display (struct Node *head) //maha kantutan li struct Node temp; temp = head; printf(" "); ] while (temp != NULL) { printf ("Araba : *s | Miktar : %d ", temp->car, temp->n); // Amaranan Dibawa wala makan salah temp = temp->ptr; } } int main() ] { struct Node *Head; Head = NULL; printf \tAraba Galerisine Hogeldiniz int b,i; printf(" Ka tane araba markas eklemek istiyorsunuz? : "); scanf("%d",&b); printf(" "); "); for(i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!