Struggling with a C coding class

So for school im required to take a C coding class and my teacher is less then helpful. Any recommendations on stuff that will help with the basics?

Did you try the online tutorials (there are some interactive ones too, so for start you do not even have to worry about setting things up), or YouTube videos?

I have tried youtube videos but to little avail.

Found this from a quick search; http://www.learn-c.org/
Also check this playlist (YouTube); https://www.youtube.com/playlist?list=PLGLfVvz_LVvSaXCpKS395wbCcmsmgRea7

There are a lot of tutorials, so odds are some will seem complex, It's normal, probability. :)

alright, thank you

The origional book on C, in PDF form https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf
good luck!

1 Like

May I ask with what specific topics are you dealing with?
I still have code examples for handling basic things. Nothing overly complex nor specific, mostly just to demonstrate concepts. Functions (with referenced and non referenced parameters), some basic stack operations, a few nav-menus based on switch, vectors of course, adding removing and showing elements from linked lists, row structures, etc

Its basically an elementary course, but perhaps it might help you.
It has comments in spanish (im from Chile) but the general purpose of the lines is pretty clear
Shoot me a private if you need more info, mate, always willing to help :)

our first assignment was
Q.1 Write a program that will take two floating point numbers and an integer from the user, compute its average and display the average on the screen.
Q.2 Convert Fahrenheit to Celsius. Take the value in Fahrenheit from the user, convert it to Celsius and display both the values on the screen.
The Fahrenheit to Celsius formula is C = (F - 32) * (5 / 9).
3. Take values for the principle, yearly interest rate and number of years. Compute the interest earned on the principle and display it on screen.

Q1 is very very simple
C is very stringent with data types and, if you try to simply add then divide to get the average, the compiler will complain that you're summing different stuff. Simply convert the one user-integer value into FP when you capture it with scanf, using the %f mask, that should work, since it will simply add a .0 after the number the user naturally inputs.
Then you do the average, which should also be a float

Q2 also deals with the fact that temperature is usually expressed as an integer. Simply capture everything as float.

Q3 requires you, again, to be careful about data types, which are managed when you declare your variables and when you read them using the correct format mask scanf("%f",&your_var);

LONG LIVE FLOAT, math.h is for sissies

Sorry for necrobump but I'd like to suggest David J. Malan's CS50 lectures if you are just beginning to learn Programming and don't have previous experience in any other language. Link: https://cs50.harvard.edu/