Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define CLEAR(x) memset(x, '\0', 512)
- #define FILENAME "num.txt"
- int main()
- {
- FILE *fp;
- long int num = 3334590234L;
- long int num1 = 0L;
- if ( ( fp = fopen(FILENAME, "w+") ) == NULL )
- {
- perror("ERROR in reading file!\n");
- exit(-1);
- }
- else
- fprintf(fp,"%ld", num);
- fseek(fp, 0, SEEK_SET);
- fscanf(fp, "%ld",&num1);
- printf("ORIGINAL TELEPHON NUMBER : %ld\n", num);
- printf("READ TELEPHON NUMBER : %ld\n", num1);
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement