gets function for 2 dimensional array(String)

66 Views Asked by At

The gets() function has only one parameter char* TYPE. I also know that the array's name is an address. EX) char buff[10][20] , address : buff

1) if there is a N dimensional array, the name of this array is also an address?

2) but when i'm asserting the argument of char buff[10][20] in to the gets() function. EX) gets(buff) there is a compile error calling that buff[10][20] cannot transfer to a char* but isn't buff also a address therefore an char*?

3) however when i assert *buff as a argument in gets function it works. EX) char buff[10][20]; gets(*buff); I'm able to approach to buffer[0]. If the *buff is an char* TYPE doesn't it mean that buff is a double pointer type? Am i getting it right?

0

There are 0 best solutions below