Created
December 25, 2018 11:28
-
-
Save naingyeminn/6df73c191bb897df5da5baa6eabf150b to your computer and use it in GitHub Desktop.
some codes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
char sometext[256]; | |
FILE *fptr; | |
fptr = fopen("/tmp/suid_test.txt","w"); | |
if(fptr == NULL) | |
{ | |
printf("Error!"); | |
exit(1); | |
} | |
printf("Enter some text: "); | |
scanf("%s",&sometext); | |
fprintf(fptr,"%s\n",sometext); | |
fclose(fptr); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment