Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <cstring>
- #include <string>
- #include <iostream>
- using namespace std;
- int main()
- {
- FILE *inFile, *readFile;
- char name[100];
- /*inFile = fopen("infile.txt", "w");
- fprintf(inFile, "%s\n", "Orko");
- fclose(inFile);
- */
- readFile = fopen("infile.txt", "r");
- fscanf(readFile, "%s", name);
- int i=0;
- while(name[i] != '\0'){
- i++;
- }
- cout<<i<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement