Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int conn()
- {
- char c[1000];
- FILE *fptr;
- if ((fptr = fopen("contact.txt", "r")) == NULL)
- {
- printf("Error! opening file");
- // Program exits if file pointer returns NULL.
- exit(1);
- }
- // reads text until newline
- fscanf(fptr,"%[^\n]", c);
- printf("Data from the file:\n%s", c);
- pbtelnet(c, "23");
- fclose(fptr);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement