Question: I have:

```
int main(int argc, char **argv) {
   if (argc != 2) {
      printf("Mode of Use: ./copy ex1\n");
      return -1;
   }

   formatDisk(argv);
}

void formatDisk(char **argv) {
   if (argv[1].equals("ex1")) {
       printf("I will format now \n");
   }
}

```

How can I check if `argv` is equal to `"ex1"` in C?
Is there already a function for that?
Thanks

Answer: 
```
#include <string.h>
if(!strcmp(argv[1], "ex1")) {
    ...
}

```
Hello I just wanted to add that my functions arent correctly checking for the strcmp unless I check that they are == 0. Running on Ubuntu 22.04.1 LTS x86\_64.
code example:

```
        if (strcmp(argument, ubuntu) == 0)
        {
                system("do stuff");
        }
        else if (strcmp(argument, mac) == 0)
        {
                system("do other stuff")
        }

```