#include <stdio.h> #include <stdlib.h> #include <string.h> #define sg struct gammal struct gammal { -char name[20]; -int payment; -struct gammal *next; }; int main() { -sg *g = (sg*)malloc(sizeof(sg)); -strcpy(g->name,"Aly"); -g->payment = 300; -g->next = (sg*)malloc(sizeof(sg)); -strcpy(g->next->name,"Ahmed"); -g->next->payment = 300; -g->next->next = NULL; -sg *temp = g; -while(temp != NULL){ --printf("%s %d ",temp->name,temp->payment); --temp = temp->next; -} }