Just need something
Posted by coolpotato98@reddit | learnprogramming | View on Reddit | 14 comments
Hello everyone I’m a comp sci student who has already failed computer science 1 already once , I just need help to learn C the programming language interesting. Idk if there are tips or tricks to learn the syntax better ? I’m pretty much a beginner with little syntax knowledge ! I’m desperate to learn the language . I got 2 months to become competent so I can take the class with confidence
Humble_Warthog9711@reddit
More often than not it comes down to work.
How many short, self contained c programs did you write top to bottom during the semester in which you failed without AI?
coolpotato98@reddit (OP)
Unfortunately in my cs class the minimum amount of lines of code that we wrote was 750 + lines of code , idk if that’s considered short but it felt crazy to me . However I do not use ai when it comes to coding bc I want to understand the logic and concepts behind what I’m learning and I want to become good at it
Humble_Warthog9711@reddit
Did you do well on exams and bad on projects? It tends to be the other way around
coolpotato98@reddit (OP)
Bad on both fairly , well I would turn in partial code at least but I just went out and got myself a tutor / mentor to guide me and help me a bit
Humble_Warthog9711@reddit
What course is this
Dazzling_Music_2411@reddit
Are you, now? You are going to have to make a bit more effort than you are making in this question (which is next to zero).
Tell us what you have done so far, and where you are facing problems. In detail.
coolpotato98@reddit (OP)
For the most part I have built things like a calculator , a temperature converter , a grader , hangman game , couple other things and it’s just doesn’t keep my interest maybe bc it’s not visually pleasing idk for sure
Dazzling_Music_2411@reddit
Hmm, doesn't sound like you're that desperate to learn at all.
Those are just ultra-basic command-line examples from an introductory chapter.
Learn bison and flex so you can write an expression calculator (something to read and calculate, say, "2*sin(π/3)+log(e/5)".
Write a game-playing program, like tic-tac-toe or checkers. Or a text adventure.
If you want something "visually pleasing" learn a GUI library (why haven't you done so yet?)
You'll never learn without putting in some serious effort, surely you don't need to be told that, do you?
coolpotato98@reddit (OP)
Yeah unfortunately this is my third year and tbh I should have became a dental surgeon ( my gf wants me to finish so I can’t switch majors ) maybe I should do more a game style programming I think that would keep my attention more to be honest
PeterPook@reddit
Play. Practice. Build things. The best learning is based upon the phrase "Now I can do this, I need to learn to do that..."
coolpotato98@reddit (OP)
Yeah what would be some good beginner programs to make ?
Matilozano96@reddit
Most programming languages are very similar, so you can make a list of the features you need to use properly in order to have a basic understanding.
Considering it’s an entry level course, I’d say you need:
Basic main function Basic function + return statement Function call Declare variable Assign value to variable Variable scope Variable types Test variable types (types of numbers, arithmetic operators, etc) Important: how do you make a string in C? Records Declare an array Modify a value on an array Can you change the length of an array? If statement Else statement While loop For loop Iterate through an array correctly Declare pointer Initialize pointer Pass pointer to function Assign value to pointer variable Free pointer Linked list Iterate through linked list Import/include statement
Some go beyond just syntax, but yeah. Just go through these and look up what you don’t know.
Skydreamer6@reddit
I made a text adventure. Look room, take knife that sort of thing.
illuminarias@reddit
Start using it. Start writing random programs to test your knowledge. Keep exploring, keep trying, stay curious.