Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <string.h>
- #include <locale.h>
- FILE* q;
- //////////////////////////////////////////////////////////////
- int main() //
- {
- char sz[99];
- char c;
- int i = 0;
- setlocale(LC_ALL, "rus");
- q = fopen("nd.txt", "r");
- fscanf(q, "%s", sz);
- printf("%s\n", sz);
- while(i++ < 30)
- {
- fscanf(q, "%c", &c);
- printf( "%c", c);
- }
- fclose(q);
- }
- /*
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <string.h>
- #include <locale.h>
- FILE* q;
- //////////////////////////////////////////////////////////////
- int main() //
- {
- setlocale(LC_ALL, "rus");
- q = fopen("nd.txt", "a");
- fprintf(q, "SONY\n");
- fclose(q);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement