#include <stdio.h>
#include <string.h>

char stack[100][100];
int top = -1;

void push(char* x) {
    strcpy(stack[++top], x);
}

void pop() {
    top--;
}

int main() {

    char step[5][10] = {"Users", "Admin", "..", "Guest"};
    
    for (int i = 0; i < 5; i++) {
        if (strcmp(step[i], "..") == 0) {
            pop();
        }
        else {
            push(step[i]);
        }
    }
    printf("C:");    

    for (int i = 0; i < top; i++) {
        printf("%s/", stack[i]);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: