Sorry for asking very simple question.I'm new to coding.
Input txt file
5,3
001
110
111
110
001
I need to print the output as
U1: 001
U2: 110
U3: 111
U4: 110
U5: 001
Upto now I was able to print the contents with this:
#include <stdio.h>
void main() {
FILE *fopen(), *fp;
int c;
fp = fopen("read.txt","r");
c = getc(fp) ;
while (c!= EOF) {
putchar(c);
c = getc(fp);
}
fclose(fp);
}
Can Anybody tell how should I proceed?