Code:
Question 8:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main(){
char data[ __ 1 __ ], tel[__ 2 __];
FILE *fptr;
int flag;
fptr = fopen("stam.txt","r");
while ((flag = fscanf(fptr, "% __ 3 __ [^$]% __ 4 __ %*c", data, tel)) == __ 5 __){
printf("%s,%s\n", data,tel);
}
} assume, that the data of ‘Bezek’ client is stored in one line in the file, as followed:
# Name – 20 characters.
# Address – 20 characters.
# Id number – 9 digits.
# Phone number – 9 digits.
complete the missing, seperate your answer with , (comma) your answer should look like 12,32,10,2,2
in your answer do not use unnecessary spaces, you must not spend unnecessary memory
write the SHORTEST answer, (use %s instead of if possible !!!
Assume data include : Name, Address & ID.
this is mt ans: 50s,10,49,10,3 , why this is not true ?
TNX .....