0

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?

Marco A.
  • 41,192
  • 25
  • 117
  • 233
양수현
  • 11
  • 6
  • Also [this](http://stackoverflow.com/questions/8767166/passing-a-2d-array-to-a-c-function) and [this](http://stackoverflow.com/questions/3959705/arrays-are-pointers) and [this](http://stackoverflow.com/questions/28267097/pass-2d-array-in-function-2d-array-received-is-pointer-array). – Shoe Jun 16 '15 at 07:28
  • `gets` has been removed from the C language, don't use that function. – Lundin Jun 16 '15 at 08:15

0 Answers0