C Program to show Memory Allocation # include <fcntl.h> # include <stdio.h> # include <string.h> # include <sys/types.h> # include <unistd.h> # include <stdlib.h> int main ( ) { int fd , fp , ch , l = 0 , q = 0 ; char * name , * in , * out ; printf ( "Enter the name of the file:" ) ; scanf ( "%s" , name ) ; fd = open ( name , O_CREAT , S_IRWXU ) ; if ( fd != - 1 ) { printf ( "%s File is created.\n" , name ) ; close ( fd ) ; while ( q == 0 ) { printf ( "Menu\n1.Rdonly\n2.Wronly\n3.Rdwr\n4.Exit\nEnter your choice:" ) ; scanf ( "%d" , & ch ) ; switch ( ch ) { case 1 : fp = open ( name , O_RDONLY ) ; printf ( ...
Get the latest unboxing and tech news at you fingertips. Collect Software and other precious data overtime