Seriously struggling with C

G

Gregory Pietsch

RG said:
Greetings friends,

This semester I have started a course in C programming. I was moving
along fine until I reached to the topic of loops (feeling embarrassed
among you elite programmers). My prof. would post program questions
and the solutions online. For practice I would try to do the problems.
I would reach to a certain point in the code, for example as far as
error trapping, but when the loop arrives, like knowing whether to use
for, while do, how to properly use the increment and decrements, and
counters,I am just not proficient in it and the class is moving ahead.

Here's a simple checklist to help you with looping constructs:

1) Does the loop have a well-defined initialization, test, and
iteration section? If so, the for loop's for you.
2) Must the loop execute at least once? If so, use the do-while loop.
3) Otherwise, use while.
Eventually i would have to look at the solution and wondering to
myself, the reason i could not think of it. What ticks me off is that
other kids are getting this stuff easily, while I am having a hard
time.Kindly advise me on what actions I shoul take.

Here's a really zen answer: Before Michaelangelo tackled the Sisteen
Chapel, he had to learn how to fingerpaint. Control statements and
iteration are as the colors in a palette; after a while, you get to
learn what looks pleasing to the eye.
I would
particularly like to have an idea of the thought process to engage in
when given the programme to write.

Sometimes the best thought process is none at all. Either that or take
the program and chop it with your mind into manageable fragments, the
way a lumberjack chops wood.
Thanks for your time and consideration.

RG

Gregory Pietsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top