I have code written that I want to see if two char\* 'strings' are equal. I have written print statements in the code to help me debug it.

Basically, the commands array is: [a, b, null]

and the cmd the user input can be anything, but if it is a, b, or null then we want to get inside the if statement.

```
for (i = 0; i < 3; i++){
    printf("cmd.name = : %s\nCommand = %s\n", cmd->name, commands[i]);
    if (cmd->name == commands[i]){
        printf("inside if\n");
        valid = 1;
    }
}

```

Its printing out:

```
cmd.name = : a
Command = a  
cmd.name = : a
Command = b
cmd.name = : a
Command = (null)

```

So in the first instance a should be equal to a right? Why is it not going inside the if statement?