#include <stdio.h>
#include <string.h>
char back[100][50];
char forward[100][50];
char current[50] = "";
int b,f = -1;
void visit(char *url){
strcpy(back[++b], current);
strcpy(current, url);
}
void goBack(){
strcpy(forward[++f], current);
strcpy(current, back[b--]);
}
void goForward(){
strcpy(back[++b], current);
strcpy(current, forward[f--]);
}
int main(){
visit("google.com");
visit("naver.com");
visit("youtube.com");
goBack();
goBack();
goForward();
printf("%s\n", current);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: