www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/02/02:47:13

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.lang.c,comp.os.msdos.djgpp
Subject: Re: hello
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <t3efoskr4indutcg2i3n1mb3qd78nsq764@4ax.com>
References: <VzNh5.66969$V34 DOT 632862 AT news1 DOT sttls1 DOT wa DOT home DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 30
X-Trace: /ba9QcBo6CFAxay2BCbL6ASYWsok3Tgk61wduHvaEVpw93uln/dC0DXQ2li8hz6CFHS2O+j4njCY!Fm2hztv9cRqFUqkjMMdE9g7NLJq9HUmCtiXxfPicrAtKKESy/EYXC7/aiMq3+Fz/c6rckBaUv4sz!KMCm
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Wed, 02 Aug 2000 06:01:04 GMT
Distribution: world
Date: Wed, 02 Aug 2000 06:01:04 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 02 Aug 2000 04:37:09 GMT, "Danny Bran" <beaverss AT home DOT com>
wrote:

(snip: "Please help me with my homework.")
> the program starts with the following statement
>create a structure with 2 fields age of type integer and height
>of type float. And then create an array of this structure, with
>a sizeof 5. Store values in this array and display them.

This is a comp.lang.c question.  Crosspost added.

Anyway, your struct and array look like this:

typedef struct Foo
{
  int age;      /* in Earth years */
  float height; /* in centimeters */
} Foo;

Foo bar[5]; /* records 0 to 4 */

You write the main(); it's your homework.

-- 
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019