Code:
#include<stdio.h>
int send() {
int p[2]={3,5};
// lol = &p[0];
return &p;
}
int main() {
int *temp=send();
printf("value: %i | %i \n",*(temp),*(temp+1));
return(0);
}
Here is the reply from the compiler
pp.c: In function ‘send’:
pp.c:6: warning: return makes integer from pointer without a cast
pp.c:6: warning: function returns address of local variable
pp.c: In function ‘main’:
pp.c:10: warning: initialization makes pointer from integer without a cast
... what's wrong ? It's just warning msg, It realy need to be changed something, I know that I dont encapsuled the function and with the result of function "send" can be manipulated but I dont know how else I can return a array. THanks for your help.
*/


