Any way to practice C programming?

Q

Lifer
Jul 21, 2005
12,042
4
81
I am taking my first CS course, and I want to be ahead/know what I am doing, so is there anyway I can practice C programming in Vista? Any website, or programs that I can use to get some practice?

I basically haven't coded anything yet (besides a simple printf code) but I know it is going to get hard and I want to be on top of things.

 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
If you are serious about CS you are going to need to get familiar with Linux. I suggest you grab VMWare Player and a free Linux appliance to get started. Ubuntu has plenty of full blown desktop installs in a VMWare appliance.
 

phaxmohdem

Golden Member
Aug 18, 2004
1,839
0
0
www.avxmedia.com
If you are wanting to just mess around, I'd suggest downloading a free C/C++ IDE such as Eclipse [ http://www.eclipse.org/cdt/ ]

If you want to get serious, I'd find a crap computer, or a decent virtual machine software, and install Linux as Crusty suggested. There are a wealth of IDE's and programming tools to be found, even in more consumer friendly distro's like Ubuntu. Or if you want to get serious on the Windows side, I'd look into a copy of Visual Studio 2008 (you should be able to get a kick-ass academic discount on it if your enrolled at an accredited institution)

I've found from personal experience however that knowing a scripting language, like Python, Javascript, or even PHP has been the most beneficial to me from a practical everyday use standpoint. There are just so many scenarios where you can write little scripts to make life so much easier, as opposed to full blown compiled apps. Plus its a good way to get the basic semantics of programming down pat. (Datatypes, Conditions, Operators, Loops, Arrays, etc). These tools are pretty much universal when you're programming.

But beyond that... the best advice I could give, is pick the language you want, and buy a good book about it. That book will take you through the basics, and you'll likely refer back to it as a manual time and time again if you stick with programming.
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
Visual Studio 2008 Express editions for C/C++, C#, et. al. are FREE right here:
http://www.microsoft.com/express/download/offline.aspx

That's the Microsoft IDE / compiler / code development environment. It works under Vista. Use the built in reference Library or download the latest full MSDN Library / SDK reference DVD image also for free at another link.

Of course for balanced experience I would concur with the others that ALSO learning how to use things like ECLIPSE, GNU C/C++ tools, make files, LINUX, et. al. would be very wise.

 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
The other fellow did make a good suggestion about getting the most of academic discounts you may qualify for. A lot of schools have almost anything Microsoft (and other companies) make for either free or cheap like $5-$15, or sometimes just at a substantial discount like $60 for a $400 retail priced suite.
Check your campus book / software stores for rates / qualifications, availability, etc. Also check 3rd party internet e-tailers that sell academic software. Microsoft sells / gives away some things directly too.
http://www.microsoft.com/stude...steal-us/default.aspx#
http://msdn.microsoft.com/en-us/academic/default.aspx
http://www.geardiary.com/2008/...chnet-99-deal-is-back/

If you're not going to base around Macintosh / LINUX, you can't go wrong getting stuff like Vista Ultimate 32/64 bit, MS Office Pro / Ultimate suite 2008, MSDN, Visual Studio 2008 Pro or whatever, Server 2008, et. al. for cheap / free / whatever.

Adobe and others probably have things that are worth checkout out too depending on your needs / interests.
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
Cygwin has the whole GCC / G++ / make / autoconf / ..... toolset + most of your favorite LINUX tools available in a binary downloadable distribution that can run under Windows XP or (mostly -- maybe not X-windows) Vista.
http://sourceware.org/cygwin/

Vista Ultimate can run Microsoft's own free Unix tools distribution.

I suppose I'd use a VM of a LINUX Live CD if I had a VM capable CPU and 1GBy or more spare RAM for the VM guest.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I'm not sure how the question "Any way to practice C programming" became an operating systems issue :). If the OP meant Vista, as he said in his topic subhead, then he should download Visual Studio Express C++ edition, which is free, and fully supports C. There are a ton of tutorials built around it, and lots of documentation of the C language on the web. Of course, Linux is worth trying out for other reasons, but I am not sure why anyone thinks the OP needs to swap operating systems in order to "get serious" about programming in C, or any other language for that matter.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Markbnj
I'm not sure how the question "Any way to practice C programming" became an operating systems issue :). If the OP meant Vista, as he said in his topic subhead, then he should download Visual Studio Express C++ edition, which is free, and fully supports C. There are a ton of tutorials built around it, and lots of documentation of the C language on the web. Of course, Linux is worth trying out for other reasons, but I am not sure why anyone thinks the OP needs to swap operating systems in order to "get serious" about programming in C, or any other language for that matter.

I mentioned getting familiar with Linux simply because he's going into a computer science program which will definitely require using Linux.
 

Atheus

Diamond Member
Jun 7, 2005
7,313
2
0
If your degree is anything like mine you won't be programming in C right away - your first papers will be on discrete math, logic, archetecture, assembly, etc. Learning these things first will make it a lot easier to do system programming in C, which is really the whole point.

It would be useful for you to know some simpler high level language though, just to get you used to thinking in loops and functions etc. Perhaps PHP? I assume you know HTML already (If not learn it). Or some kind of shell scripting?

Also if you have never done the following before, and it sounds like something you might enjoy, I would suggest you do it:

Buy a cheap computer off ebay. Something old, crap, maybe slightly exotic, but mostly working. Look it up and find out about the components. Take it apart, clean it up, and put it back together again. Overclock it. Install Linux on it - not one of these new GUI desktop systems but something really basic like minimal debian. Rebuild the kernel. Install some software from source. Network it with your main machine. etc etc...

This stuff is NOT computer science and they will NOT teach you anything like this, but it will be HIGHLY advantagous for you to know it. People expect you to be familiar with this sort of thing. It will open up all sorts of interesting projects to you.
 

txrandom

Diamond Member
Aug 15, 2004
3,773
0
71
I'd use Cygwin. I think that will help you get familiar with Linux. At least more so then Eclipse or Visual Studio. I just reinstalled it today...
 

Net

Golden Member
Aug 30, 2003
1,592
2
81

check with the CS department (if your in college) to see if they signed up with the microsoft software alliance. then you can get tons of free development, operating system, etc.. software
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
Cygwin is definitely the best choice IMO (since it's more convenient than VMWare), unless your university uses MS products in their courses, in which case pick an MS product.
 

Evander

Golden Member
Jun 18, 2001
1,159
0
76
Alot of answers given here seem overly complicated.

1) You'll need a C developing environment. Back in my day I used Borland C++ which I paid money for, but there are free ones available here, choose 1:
http://www.bloodshed.net/devcpp.html (never used it, but it's been around for awhile and screenshots looks decent, I think I'd recommend this one first)
http://www.eclipse.org/cdt/ (Eclipse is known for Java development, I didn't know they did C also, but again haven't tried this)
http://www.thefreecountry.com/compilers/cpp.shtml (list of other freebies)

2) You'll need a book or website to teach you C. For a book, C for Dummies is actually quite good and comes in 2 volumes, if you like and finish the first volume you can buy the second one. I haven't used any websites, but this one has been around for a long time:
http://www.eskimo.com/~scs/cclass/notes/top.html
and looking over the contents is covers everything you'd typically learn in a beginner C course
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
I recommend code blocks.
One download for both the ide and compiler.
Great for a new user and it works almost the same in win/linux/mac and is powerful enough to do just about anything.
http://www.codeblocks.org
Get the minigw windows download

 

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
To build on this question, is there any advantage to learning C over C++ at least as far as college coursework is concerned? I have had one C++ class, but am wondering before returning to school (this is for a second degree) if I should review my C++ or buy a text on C and learn it. It's not clear from course descriptions which language is emphasized, and in the degree description under programming languages it states C/C++ are preferred.

I've always been intrigued by C, but if there's no real advantage to learning it over C++, it would be easier to review my C++ materials.
 

SunnyD

Belgian Waffler
Jan 2, 2001
32,674
146
106
www.neftastic.com
I suppose what needs to be asked - what environment do your CS classes use? When I was in college, most of our development was actually done under Windows. Only my Unix class and my OS class programmed anything under Unix, and frankly C is C no matter what OS you use it on.

I would say if your CS classes target Windows, download Visual C++ Express from Microsoft. If your classes target Unix, do the VM thing mentioned above and install Linux. My personal suggestion, avoid Cygwin - it's junk. The C Runtime Library is the C Runtime Library whether you run it on Unix or Windows - ANSI C is all the same.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Originally posted by: EvilManagedCare
To build on this question, is there any advantage to learning C over C++ at least as far as college coursework is concerned? I have had one C++ class, but am wondering before returning to school (this is for a second degree) if I should review my C++ or buy a text on C and learn it. It's not clear from course descriptions which language is emphasized, and in the degree description under programming languages it states C/C++ are preferred.

I've always been intrigued by C, but if there's no real advantage to learning it over C++, it would be easier to review my C++ materials.

I think it depends on what you are planning to do.
If it is engineering then I highly recommend learning C.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: EvilManagedCare
To build on this question, is there any advantage to learning C over C++ at least as far as college coursework is concerned? I have had one C++ class, but am wondering before returning to school (this is for a second degree) if I should review my C++ or buy a text on C and learn it. It's not clear from course descriptions which language is emphasized, and in the degree description under programming languages it states C/C++ are preferred.

I've always been intrigued by C, but if there's no real advantage to learning it over C++, it would be easier to review my C++ materials.

An understanding of C and some of it's pitfalls will help you utilize C++ and spot flaws easier.

Also, there is much engineering/embedded work that uses C and not C++.
You will also have a hard time finding C# isnembedded applications (there are some out there) because it requires a Window's OS that adds bulk to a package.

 

Q

Lifer
Jul 21, 2005
12,042
4
81
I am confused.
Let me explain: I'm a programming noob. The only programming I've ever done was Basic back in early high school. That was easy, and whenever you got done writing anything and wanted to test it out you simply push F5 or whatever, and the program would run.

Is there not a way I can do this for C? I have some programs to write that are due on Tuesday, and I want to be able to do them on my laptop just like I did w/ Basic, where I can test them out and see if they work.

How do I do something like this?
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Most graohical type IDEs will allow you to execute/etst your code using a control button to start/debug your application.

Download VS Express (free)

Follow instrucitons to create a project.

Create the proper source files or include existing files into your project.

Compile your code using the Build option.

Use the Debug options to test your compiled code
 

Q

Lifer
Jul 21, 2005
12,042
4
81
Originally posted by: Common Courtesy
Most graohical type IDEs will allow you to execute/etst your code using a control button to start/debug your application.

Download VS Express (free)

Follow instrucitons to create a project.

Create the proper source files or include existing files into your project.

Compile your code using the Build option.

Use the Debug options to test your compiled code

Thanks, but which one? C++ or Visual Basic?