New answers tagged


You are trying returning the local variable address that going to destroy at end of function because int myarray[3] here myaray is pointer to a continues memory location not int you can check it by, int main() { int myarray[3] = {0}; if(myarray == &myarray[0]) { printf("Yup ! same"); } return 0; } So what is way to do that ...

Top 50 recent answers are included