#include <stdio.h>

void test(int x) {
    if (x == "open")
        printf("opened\n");
    if (x == "close")
        printf("closed\n");
}

int main() {
    char *x = malloc(20);
    const char *y = x;
    
    memset(x, 0, 20);
    strcpy(x, "open");
    
    test(y);
    
    strcpy(x, "close");
    
    test(y);
    
    free(x);
    return 0;
}