In ubuntu, the terminal code is not compiling on the other hand in windows cmd the code is running without error. how can I solve this
#include <stdio.h>
#define MAX 50
int main()
{
char str[MAX];
// MAX Size if 50 defined
gets(str);
printf("String is: \n");
// Displaying Strings using Puts
puts(str);
printf("\n");
return 0;
}
my screenshots:
[](https://i.stack.imgur.com/ltdx2.png)```
[](https://i.stack.imgur.com/9Skf4.png)