sendman123
Programmer
Hi,
I have a C program that reads the data from a file called "info" and prints it. Here is the code.
#include <stdio.h>
void main()
{
FILE *fopen(), *fp;
int c ;
fp = fopen("info","r");
c = getc( fp ) ;
while ( c != EOF )
{ putchar(c);
c = getc ( fp );
}
fclose( fp );
}
Now the data in the info file is:
nbsol148
ADM-16
TP2.1
NULL
I get the output in the same manner. I want the output in a single line. Is it possible. If yes, how to do it.
Thanks in advance
I have a C program that reads the data from a file called "info" and prints it. Here is the code.
#include <stdio.h>
void main()
{
FILE *fopen(), *fp;
int c ;
fp = fopen("info","r");
c = getc( fp ) ;
while ( c != EOF )
{ putchar(c);
c = getc ( fp );
}
fclose( fp );
}
Now the data in the info file is:
nbsol148
ADM-16
TP2.1
NULL
I get the output in the same manner. I want the output in a single line. Is it possible. If yes, how to do it.
Thanks in advance