title: How to open a file which is in read write execute mode in C (shell programming)
body: <p>I am trying to create a file, but it is opening in locked mode. How to make it in read write execute mode?</p>
  
  <pre><code>switch(choice){
  case 1: printf("\n Enter the file: ");
      scanf("%s", file);
      open(file, O_CREAT, S_IRWXG);
      break;
  </code></pre>