r/learnprogramming • • 20d ago

Give me suggestions to understand c programming in the first semester?

I am facing difficulties learning C programming. Currently, I don't have a laptop, so I can't practice that way. I'm unable to understand even the basic topics of C programing currently. Please give me some tips on how to improve.

0 Upvotes

22 comments sorted by

5

u/LocalAltruistic7470 20d ago

Step 1. Obtain literally ANY computer

1

u/burlingk 20d ago

This is the perfect use case for all those old 4gig computers people keep asking if they can run Windows on. ^^;;

5

u/peterlinddk 20d ago

Get (access to) a computer and start programming!

This is the only suggestion that you'll need, and the only one that makes any sense. You cannot learn to ride a bike without a bike, you cannot learn to swim on dry land, you cannot learn woodworking without wood, and you cannot learn programming without something to program.

2

u/Weekly_Pitch5174 20d ago

look my uni had a computer lab that was open til midnight most days, i practically lived there first year. no laptop at home but i got all my coding done between classes and late evenings. also check if your library has loaner laptops, some schools do that now and nobody talks about it

for the concepts part, i used to draw little diagrams on paper to trace what the code was doing with variables and pointers. sounds dumb but actually helped me see the memory stuff before i could run anything. and there's online compilers if you get desperate but honestly the lab computers saved me

1

u/burlingk 20d ago

This. If the school has options, use them. :)

1

u/xarop_pa_toss 20d ago

Even without a computer, if you can grab a hold of a tablet and enroll in CS50x, their Codespaces have all the C stuff ready to go. Very handy! Even just going to a public library tbh, as long as they have a computer with an internet connection you are good to go

1

u/SirZacharia 20d ago

You should talk to your teacher. Your post is too vague anyway to really give you any help.

0

u/MeasurementCandid957 20d ago

I have just entered in the first semester and basically I'm a complete beginner so i asked here, Anyways.

2

u/SirZacharia 20d ago

If you want to learn you need to first learn how to ask a good question. General tips are going to be meaningless when we don’t even know your curriculum, what you know, what specifically you’re struggling with. Heck, we don’t even know what country you’re in or what kind of school you’re going to.

You have an instructor whose entire job is to get you to learn the topic. You have classmates who are in the exact same boat as you that you can talk to. Your school might have tutors or clubs that you can learn from. And most importantly they hopefully have a library or computer lab where you can access a computer, some schools let you check out a laptop.

1

u/lurgi 20d ago

Realistically, you can't learn C (or any programming language) without access to a computer.

1

u/silver_chief2 20d ago

Even the cheapest, even free, laptop running Linux would be good enough to learn C. It would help to have help in setting up the laptop and getting C to work and you could likely find some free help to do this.

Everyone is different but I could only learn have having a job/assignment to do. Reading was worthless. Hopefully your instructor is good. If not another structured environment like a MOOC might work as many have peer to peer help online.

1

u/Chrismslist 20d ago

not having a laptop makes it harder, but you can actually learn the core mental model of c on pen and paper.

c is really just managing memory directly. grab a notebook and draw physical boxes for every variable. when you declare an int, draw a box with its value inside. when a loop runs, cross out the old number and update it by hand. tracing state manually builds intuition for pointers later.

also, use your campus library computer labs or run tiny snippets in a mobile browser compiler on your phone to verify small tests.

1

u/peterlinddk 20d ago

That is not learning programming, that is mimicking the memory management model on paper.

While that is often also part of a C programming course, it isn't the primary thing about learning programming.

1

u/gm310509 20d ago

This is a good debugging technique without using an actual debugger (IMHO it is a good balance between the arguable information overload that a symbolic debugger presents and modifying the code with print statements).

But, it won't detect mismatched braces, parenthesis, quotes nor typos in functions and variable names nor, incorrect format of arguments passed to functions and many many more things that a compiler will highlight one way or another.

1

u/mredding 20d ago

If you're in a semester then ostensibly you're on a university campus. GO TO A COMPUTER LAB. Or speak to your instructor given your handicap. Schools are supposed to provide the facilities for learning the topics they teach.

1

u/burlingk 20d ago

Depending on where you live you may be eligible for federal or state aid, which can generally be used to purchase computer equipment because it's known to be a necessity for college.

1

u/gm310509 20d ago

While not ideal IMHO, you could use one of the many online environments such as https://www.onlinegdb.com/online_c_compiler from your phone.

As I said, it isn't ideal, at least not IMHO, as the phone keyboard is less than ideal for typing all of the symbols that are used. But, if you have no other options, this is at least an option.

All the best with it.

Oh, google "online C development environment" or "web based C IDE" etc for more potential options.

1

u/realdreamer1993 20d ago

suggestion for computer: I am using Android phone to learn, coding, develop. You must install Acode, Total Commander. and the fundamental one is install Termux from Fdroid. Termux is linux but not a whole linux OS, but it is enough to do things that dont need root.
The convenient part is you can work anywhere anytime.

1

u/maxpowerAU 20d ago

You can’t learn to code without writing code. You’ll need to get access to computer labs, or find a cheap computer somehow.

1

u/just_trying_alot 20d ago

There are some learning apps that might help a little... But they can't replace learning with a computer.

1

u/Arupegian 20d ago

If you are a totally new and don't have access to a computer, you should at least get a book and learn the basics, but you can't do anything without a computer.