Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: An interest...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 8 Topic 26065 of 26821
Post > Topic >>

Re: An interesting c program for beginners

by "Malcolm McLean" <regniztar@[EMAIL PROTECTED] > May 5, 2008 at 09:26 AM

<apaticul@[EMAIL PROTECTED]
> wrote in message
> void main () {
>  char first[100];
>  char last[100];
>  int age;
>  int ssn;
>  float salary;
>
>  readPerson(first, last, &age, &ssn, &salary);
>  writePerson(first, last, age, ssn, salary);
> }
>
> So, my question is, how would I combine all these codes in order to
> get a proper working program?
> TIA
>
Comment out everything and add printf("hello world\n") to the body of 
main(). That tells you your compiler is set up correctly.

Once hello world works, comment in the smaller function, and pass it dummy

data. See if it prints the dummy data. Fiddle with it until correct.
Then turn your attention to the larger ****ntion. Try just reading in one 
variable at first. Add variables and continue fiddling with it until it 
works.
Eventually you end up with a working program.

-- 
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
 




 8 Posts in Topic:
An interesting c program for beginners
apaticul@[EMAIL PROTECTED  2008-05-04 23:45:50 
Re: An interesting c program for beginners
Richard Heathfield <rj  2008-05-05 07:48:07 
Re: An interesting c program for beginners
"Malcolm McLean"  2008-05-05 09:26:35 
Re: An interesting c program for beginners
apaticul@[EMAIL PROTECTED  2008-05-05 04:23:26 
Re: An interesting c program for beginners
Niz <niz@[EMAIL PROTEC  2008-05-05 13:18:22 
Re: An interesting c program for beginners
"Bill Leary" &l  2008-05-05 10:25:32 
Re: An interesting c program for beginners
William Pursell <bill.  2008-05-05 13:15:45 
Re: An interesting c program for beginners
Nick Keighley <nick_ke  2008-05-06 03:58:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 0:39:29 CDT 2008.