help. how to blank off when info from file...

R

Ristar

#include <stdio.h>

#include <conio.h>

#include <string.h>

#include <stdlib.h>

#include <windows.h>

#define file1 "data.txt"



FILE *read;

char a[12]="A1";

char b[4]="A2";

char c[4]="A3";

char d[4]="A4";

char e[4]="A5";



int main()

{

read=fopen(file1,"r");

if(read==NULL)

{

system("cls");

printf("Cannot Open File");

getch();

}else

{

/*need help here



if there is "A1" "A2" "A3" and "A4" in the data.txt, then make
the program show only "A5" in its correct position. please edit
it so that it can blank off any one string that appears in the
data.txt and show all the strings in its correct positions.





*/

printf("%s %s %s %s %s",a,b,c,d,e);

}



getch();

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,369
Latest member
FTMZ

Latest Threads

Top