By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,604 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,604 IT Pros & Developers. It's quick & easy.

display the attchment list

P: n/a
HI

how to display the equipment list on my computer.(using pointers)

regards

rajkumar

Nov 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
rkumar <ra************@gmail.comwrote:
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
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Nov 9 '06 #2

P: n/a
On 2006-11-09, rkumar <ra************@gmail.comwrote:
HI

how to display the equipment list on my computer.(using pointers)
This is an easy one, although a little off-topic. Print this
message off, and tape it to your machine, beside the equipment
list:
|\
| \
| \
|================================= \
| THIS ARROW IS A \
| |\ /=\ | |\ | ===== |== |\ \
| |/ | | | | \ | | |= |/ \
| | \=/ | | \| | |== |\ /
| /
|================================== /
| /
| /
|/

Then consider why you felt like posting vague homework
questions on a technical newsgroup.
Nov 9 '06 #3

P: n/a
In article <11**********************@f16g2000cwb.googlegroups .com>,
rkumar <ra************@gmail.comwrote:
>how to display the equipment list on my computer.(using pointers)
Standard C does not offer any way of finding out what kind of
peripherals or display or cpu or memory that a computer has.

Your operating system may offer an interface to examine the
equipment, but even the names of those routines would be specific
to your operating system, so you should ask the question in a newsgroup
that deals with your operating system.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Nov 9 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.