rkumar said:
how to display the equipment list on my computer.(using pointers)
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
FILE *el; /* here's your pointer, or is one not enough? */
int c;
int *cp; /* ok, here's another one just for the fun of it */
if ( ( el = fopen( "/home/rkumar/equipment list", "r" ) == NULL ) {
printf( "Sorry, equipment list not found.\n" );
return EXIT_FAILURE;
}
cp = &c;
while ( ( c = fgetc( el ) ) != EOF )
putc( *cp );
fclose( el );
return EXIT_SUCCESS;
}
Seriously, how do you expect anybody to give you a reasonable answer
when you can't even decide what you want to ask about? In the subject
you write about an "attachment list" but in the article you ask about
an "equipment list" (whatever that is). And it's unclear if "on my
computer" refers to "display" or "equipment list" or both. If you want
answers ask questions that make sense. And make sure the question is
on-topic for this group - questions on how to display e.g. an attach-
ment of an email on system XYZ is typically not on-topic here (whether
you try to do that in C or not) because usually it's about some speci-
fics of system XYZ and not about the C language. Only if you have prob-
lems with C itself (but not some third-party libraries) you can expect
help here (except maybe a redirection), there are enough other groups
that deal with system specific issues
Regards, Jens