0

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: 

[![windows command prompt ss](https://i.stack.imgur.com/ltdx2.png)](https://i.stack.imgur.com/ltdx2.png)```
[![wsl ubuntu ss](https://i.stack.imgur.com/9Skf4.png)](https://i.stack.imgur.com/9Skf4.png)
rohit
  • 1
  • 1

0 Answers0