array return type

后端 未结 5 777
有刺的猬
有刺的猬 2021-01-29 15:25
#include
#include
#define MAX 30

void push(char );


char stack[MAX];
int tos=0;

int main(){
    char str[]=\"Arijit Saha\";
    char *f         


        
5条回答
  •  既然无缘
    2021-01-29 16:22

    char reverse[strlen(s)]; is on the stack. After the function complete it is now invalid, but you are returning its address.

提交回复
热议问题