C - Questions one should ask...

Last week, I was explaining someone the difference between switch case and if-else if, I thought of writing this blog to ask some questions. Try finding the answers, if you cant, ping me, I will try to answer:

Plz note that, this is meant for beginners only and I will update the list as I come across the questions. If you have questions like this, do ping me :)

Q1: When to use "switch" and "if-else if"?
Q2: What should be the ideal/efficient way of ordering the cases in switch cases?
Q3: When you would rather not have a break in a switch case?
Q4: When you would want the default case to be the first case in a switch case?
Q5: When to use different types of loops?
Q6: How to use different number systems in programming?
Q7: When to use ternary operator?
Q8: When to use union then structure?
Q9: Whats the difference between heap and stack memory?
Q10: How to find out what preprocessor does to a C program file?
Q11: What is preprocessing, compiling and linking?
Q12: When to use pointers and when not to use them?
Q13: Whats the use of return value from main function, How you can use it?
Q14: When to use iteration(loops) and when to use recursion?

No comments:

Books I like

  • Inside C++ Object Model
  • Unix Network Programming - Stevens
  • Professional-c++-programmer-to-programmer - wrox
  • Beautiful-code-leading-programmers-explain-how-they-think-theory-in-practice