I've been doing problem set 1, and I seem to be running into blocks with syntax that I do not know, so I can come up with pseudocode and have a rough idea of what I want to do, but then when it comes to implement it I get a bit stuck and then I have to ask questions on here, which while helpful, can be a bit time consuming.

So I wanted to know, when people have this issue, how do they usually go about looking up the details on the syntax? Say for example I knew I wanted to cast a float to an int (picking a fairly easy example here for argument's sake - I know there are some videos on cs50 but they're not always the complete answer), but didn't quite know how to do that in C exactly, how would I quickly find out? What resources do people tend to use, and HOW do they use them?


  • What do you want to ask is still not clear to me. Do you wish to know about good coding habits(i.e. how to write code so that it is legible for your peers to read and help easily rather than taking much time in understanding what the code actually does!) or something else?
    – sinister
    Sep 11, 2014 at 17:27
  • Sorry for not being clear, what I mean is: Say I'm writing a program, and I know roughly what I want my program to do e.g. I've written some pseudocode, but I don't know how I'd go about actually writing it in c in the proper syntax, how could I quickly find out how to do it? Is there a recommended resource for this kind of thing? Preferably the information would be explained in plain english so a beginner programmer such as myself can figure it out. Imagine you're having this problem yourself - how would you go about looking up the information you need most readily? Just google and hope? Sep 12, 2014 at 11:51
  • Of course, Google is your friend in such conditions. Let me remind you that cs50 started from scratch(the graphical language) and that could help a lot for building understanding against any programming language. Just replace those building blocks in your mind with the respective syntax of the language. But the most important thing is PRACTICE, programming is like math, the more you do,the better you become.
    – sinister
    Sep 12, 2014 at 16:00

3 Answers 3


for C syntax you might want to look up "c reference card" or "c cheat sheet" using your favorite search engine to (typically) find a 1 page pdf covering the syntax and ansi standard library functions.


I have used this a couple of times. I think they mentioned it in the course but I'm not sure.



With time, when you code, you're gonna realise that code flows out of your body naturally, similar to the way words pour out of our mouth when we speak. In the beginning(like you are), coding might seem rather difficult. So, right now, I'd personally suggest that the better way to learn code will be by taking reference online at Google, or any of the following resources:

  • Linux man[Manual] pages
  • The C Pocket Reference Book
  • Struggling by yourself: Personally, I believe this is the hardest, yet, the most teaching method of any methods I know of...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .