0

why I this peace of compiles without error :

#include <stdio.h>

int main(int argc, char *argv[]){

        return 0;
}

but it doesn't :

#include <stdio.h>

int main(int argc, char argv[][]){

        return 0;
}

I know char **argv and char *argv[] are the same,but what's difference between char *argv[] and char argv[][]?

I think my question is different than this question, it's about difference between *argv[] and **argv.

Amir reza Riahi
  • 1,540
  • 2
  • 8
  • 34
  • 3
    I don't think the linked duplicate actually answers what's being asked here. But there is [a duplicate that explains it](https://stackoverflow.com/q/20523665/10077). – Fred Larson Feb 22 '21 at 16:45
  • The question I linked is a different question than the one that was given as a duplicate. I believe that it should be added to, or replace, the link given in the duplicate closure. I can't do that because I don't have a C gold badge. – Fred Larson Feb 22 '21 at 16:49

0 Answers0