-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
27 lines (26 loc) · 747 Bytes
/
Copy pathtest.c
File metadata and controls
27 lines (26 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include "tetlib.h"
int main()
{
FILE *stream = fopen("stream", "w");
fprintf(stream, "%s", fconvstr("address_file.txt"));
fclose(stream);
stream = fopen("stream", "r");
int number;
fscanf(stream, "%d", &number);
//char number[1024];
//fscanf(stream, "%s", number);
/*if (number <= 0)
printf(" there are no files ! \n");
else if (number == 1)
printf(" there is 1 file: \n");
else
printf(" there is/are %d file(s): \n", number);
char first[1024], second[1024];
for(int i = 0; i < number / 2; i++) {
fscanf(stream, "%s %s", first, second);
printf(" - \'%s\' at %s\n", first, second);
}*/
fclose(stream);
return 0;
}