Like Tree1Likes
  • 1 Post By rocky

How to develop good logic in C language

This is a discussion on How to develop good logic in C language within the C Programming forums, part of the General Programming Boards category; i am a beginner in C programming. i find programming very tough and also my logic is not good. can ...

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    1

    Question How to develop good logic in C language

    i am a beginner in C programming. i find programming very tough and also my logic is not good. can anyone tell me how to develop logic in C programming?
    shanky burman likes this.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,197
    By doing lots and lots of programming. At least that is how I develped my logic.

  3. #3
    ex-DECcie
    Join Date
    Dec 2005
    Posts
    125
    Quote Originally Posted by rocky
    i am a beginner in C programming. i find programming very tough and also my logic is not good. can anyone tell me how to develop logic in C programming?

    Personally, I think that logic is a separate thing from programming.

    To me, logic is HOW you solve the problem, regardless of what language you're eventually going to use. Yes, if you tend to program in one language more than others you might think in that idiom, but try to keep things very generic.

    For example, if you're tasked with modeling a banking transaction, you can break the transaction down into component steps. For a deposit, it would be receive the amount of money from the customer, find their account, update that account with the additional funds and then give the customer a receipt.

    None of that really has anything to do with C, Python, Perl, C++, Java, Lisp or any other language. Once you decide what the steps are that you have to follow (i.e. your "logic") then you can determine how best to implement those steps in your chosen language.

    Sometimes you can get really hung up trying to approach a problem once you've decided on the language. And yes, there are always restrictions -- your shop many only use one specific language, or for security you want something that is compiled as opposed to something that is scripted...

    But do try to approach the problem as generically as possible.

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    15
    Maybe the follow steps can hlp u ^.^

    1) Find out the requirements/limitation for the program u r goin to do
    2) Visual how the output is going to be
    3) Program it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Java as a Main Language in College Won't Do Good
    By alphaoide in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 01-01-2006, 09:02 AM
  2. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM
  3. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 05:48 AM
  4. Good site to learn about Prog. language concept?
    By Extrovert in forum Tech Board
    Replies: 5
    Last Post: 03-13-2003, 01:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21