Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

System programming c

$
0
0
Im new to system programming in c..can someone tell me an example of what arguments this program expecting in the terminal?



#include <fcntl.h>
#include <stdlib.h>
#define PERMS 6666

int main(int argc,char* argv[] )
{
  int n = 10;
  int fd = open(argv[1],O_CREAT | O_WRONLY | O_RDONLY, PERMS );
  int w = write(fd,&n,sizeof(int) );
  close(fd);

}



Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>