Thursday, July 30, 2009

Programming C help?

For programming with C (not C ++) how do you know what to do next in a program? Do you have any tips on what to do first????

Programming C help?
Programming is taking the ability to explain directions to someone else on doing generic things and then converting that into the syntax of the language.





Whatever your assignment is: Do it by hand on paper first and then write down how you would tell someone else to do it. Finally, see if you can translate that into the syntax of C.





If you need to remember something then use a variable. If you need to do something more than once then that is a for or while loop. If you need to make a decision, you will use an if or case.





I hope this helps.
Reply:I'm not sure what you are asking. When a C program runs, the place that it starts is in the main function, which looks like this (everything I wrote between the /* and */ is just a comment which you can read but is ignored by the C compiler):





int main()


{


/* This is where you write C statements that tell the computer what you want it to do, including 'calls' to other functions that tell the computer what to do. */





return 0;


}
Reply:i think i got u.......


u have problem wid analysing d Question


so ur 1st step is 2 go thru d core of d prob statement n den start programming


okay den , consider urself as a computer and think tht if u r given to solve dis problem wht all variables or inputs u'll need


followed by processing u'll require


and finally d outputs





n den try to implement problem frm d computer's point of view considering the problem statement correctly





just think on d above data atleast twice..............coz most of my students get benefited by dis logic





i hope it'll help
Reply:your question is so vague!!!!


C as in disk drive C?


and you want to PROGRAM it? what do you mean?


IM/email me!


i could help
Reply:Huh? Your question doesn't really make sense... are you asking, "how do you know what to do next in a specific program?" ... I suppose that depends on what the program is meant to do. Or are you asking "How do you know what to learn next in C once you've learned the basics?" ... again, we'd need more details to say where you are in your studies and what you consider "the basics."
Reply:What to do first? What to do next? Try this:





1. Understand the problem to be solved.


2. Design the program.


3. Write the code.


4. Test the code.





Those steps, of course, are not language-specific. If you want to skip the preliminaries, and go straight to writing a C program, start here:





int main(int argc, char *argv[]) {





}





What to do next depends entirely on what you need your code to do. Your question is much to vague for me to give any more specific advice.


No comments:

Post a Comment