#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 20
struct data{
int age;
struct data *nextAge;
};
int main()
{
system("color 2f");
struct data zero, satu, dua, tiga;
zero.age = 24;
satu.age = 27;
dua.age = 32;
tiga.age = 55;
struct data* next, *current;
zero.nextAge = &satu;
satu.nextAge = &dua;
dua.nextAge = &satu;
tiga.nextAge = NULL;
current = zero.nextAge;
int i;
for(i=0; i< 3; i++){
printf("%d\n", (current-i)->age);
}
return 0;
}
#include <stdlib.h>
#include <string.h>
#define N 20
struct data{
int age;
struct data *nextAge;
};
int main()
{
system("color 2f");
struct data zero, satu, dua, tiga;
zero.age = 24;
satu.age = 27;
dua.age = 32;
tiga.age = 55;
struct data* next, *current;
zero.nextAge = &satu;
satu.nextAge = &dua;
dua.nextAge = &satu;
tiga.nextAge = NULL;
current = zero.nextAge;
int i;
for(i=0; i< 3; i++){
printf("%d\n", (current-i)->age);
}
return 0;
}
No comments:
Post a Comment