Explain how arrays in GO work differently than in C?

devquora
devquora

Posted On: Feb 22, 2018

 

  • If you pass an array to a function, it will receive the copy of the array and not the pointer to it.
  • Arrays are values, assigning one array to other copies all the elements.
  • The size of an array is part of its type The type int[20] and int[10] are distinct.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Golang Programming Interview Questions

    What is GO?

    It is an open source programming language makes the programmers build a simple, reliable and efficient software easily...

    Golang Programming Interview Questions

    What are the structures of syntax in GO?

    In GO programming language the syntaxes are specified using EBNF (Extended Backus-Naur Form) Production = production na..

    Golang Programming Interview Questions

    Explain workspace in GO?

    A code has to be kept inside a workspace GO. A workspace is defined as a directory hierarchy with three directories. pk..