• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Learning to Program C

LORD_OF_WAR

New Member
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Location
H4><0RR1NG 1N2 TEH 4-RAMMS
System Name Custom Built Pr0n Star
Processor Intel C2D E4500
Motherboard Asrock 4CoreDual SATA2
Cooling 3 Chassis Fans and Standard Intel CPU Cooler
Memory 2GB DDR2 667
Video Card(s) Galaxy 8600GT 512
Storage 320GB Sata soldered to motherboard
Display(s) 17" Viewmaster
Case Thermaltake Wing RS101
Audio Device(s) Onboard
Power Supply Coolermaster eXtreme Power 600W
Software Windows XP
Hello to all

As some of you may have guessed, I am starting to learn how to program C during the school holidays. I have been advised to learn C first, and then C++, so I am looking for a useful web tutorial to aid me in learning this complex langauge. I already know almost everything about HTML and CSS, so I now want something a bit more useful to learn. Any help would be great!!!
 

department76

New Member
Joined
Jan 7, 2008
Messages
519 (0.09/day)
Location
U of WY, USA
System Name Fusilli
Processor AMD Phenom II 965 C3 @ 3.9GHz (200x19.5, 1.51V)
Motherboard MSI K9A2 Platinum 790FX/SB600 (AM2+)
Cooling Zalman 9700NT, 2x silent 80mm & 2x 120mm Scythe & Enermax
Memory 4GB Patriot Viper DDR2 @ 1066 5-5-5-15 2.1V
Video Card(s) Sapphire HD4870 512MB @ 825/1050 (3x heatpipes)
Storage 2x 250GB RAID 0 - Seagate 7200.10 16MB on Promise FastTrak
Display(s) ViewSonic VX2450 & VX1940
Case Lian-Li PC60 PlusII
Audio Device(s) Auzen X-Fi Prelude, Denon AH-D1000 headphones
Power Supply OCZ GameXtreme 600W
Software Windows 7 Pro x64
Benchmark Scores 3DMark Vantage - P10909
i took two c++ classes simuiltaneously without any knowledge of C and i did fine. dont bother with C, it's obsolete anyhow according to some, just elarn c++
 

Oliver_FF

New Member
Joined
Oct 15, 2006
Messages
544 (0.08/day)
Processor Intel q9400 @ stock
Motherboard Lanparty P45-T2RS
Cooling Zalman CNPS-9500
Memory 8GB OCZ PC2-6400
Video Card(s) BFG Nvidia GTX285 OC
Storage 1TB, 500GB, 500GB
Display(s) 20" Samsung T200HD
Case Antec Mini P180
Audio Device(s) Sound Blaster X-Fi Elite Pro
Power Supply 700w Hiper
Software Ubuntu x64 virtualising Vista
Don't even bother with any form of C/C++/C#, learn Java. I know all 4 and Java is definitely the most useful and easiest to understand.

Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java ;)

Java runs on any OS/system

All the libraries are already there and ready for you

Its hard to do stupid stuff in Java

You can write poor code and it will optimise it on your behalf as it runs
 

Kreij

Senior Monkey Moderator
Joined
Feb 6, 2007
Messages
13,817 (2.20/day)
Location
Cheeseland (Wisconsin, USA)
Check out the stickied thread at the top of this forum.
It has a ton of links to all kinds of stuff for progamming.
 

LORD_OF_WAR

New Member
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Location
H4><0RR1NG 1N2 TEH 4-RAMMS
System Name Custom Built Pr0n Star
Processor Intel C2D E4500
Motherboard Asrock 4CoreDual SATA2
Cooling 3 Chassis Fans and Standard Intel CPU Cooler
Memory 2GB DDR2 667
Video Card(s) Galaxy 8600GT 512
Storage 320GB Sata soldered to motherboard
Display(s) 17" Viewmaster
Case Thermaltake Wing RS101
Audio Device(s) Onboard
Power Supply Coolermaster eXtreme Power 600W
Software Windows XP
i took two c++ classes simuiltaneously without any knowledge of C and i did fine. dont bother with C, it's obsolete anyhow according to some, just elarn c++

Ok, being the total n00b that i am, I still know a bit of what is right and wrong. I have been suggested, by a software programmer to learn C first, as it is less object orientated that C++. C is not obsolete, although it will eventually go out, I am still willing to learn it.

Don't even bother with any form of C/C++/C#, learn Java. I know all 4 and Java is definitely the most useful and easiest to understand.

Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java ;)

Java runs on any OS/system

All the libraries are already there and ready for you

Its hard to do stupid stuff in Java

You can write poor code and it will optimise it on your behalf as it runs

Once I'm done learing the different C languages, i do intend to leanr some java/javascript, but ATM, I want to learn C.

Thanx to the most recent post, since it was actually helpful. Any Other help would be great!
 
Joined
Jul 29, 2007
Messages
392 (0.06/day)
Location
Portugal
System Name Lil'Lighty
Processor Intel Core i3 530 @ Stock
Motherboard Asus P7P55D
Cooling Artic Cooling Freezer Pro Rev.2
Memory Gskill Ripjaw 1600MHz 9-9-9-24 8GB
Video Card(s) MSI GeForce GTX650 OC 1GB
Storage WD Blue 500GB AAKS
Display(s) ASUS 20'
Case Aerocool Aeroengine II // Two 120mm Blue Fans
Audio Device(s) Creative SoundBlaster LE // Logitech X-230
Power Supply Corsair VX450W
Software Windows 8.1 Pro x64
Well, if you really want to learn C, do it. You will find that it is a very powerful language. Why aren't you willing to learn C# or C++? Is it because it's an object-oriented programmimg language?

I believe that C# would be more easier than C, perhaps due to the simplified code and the use of objects.
 

Oliver_FF

New Member
Joined
Oct 15, 2006
Messages
544 (0.08/day)
Processor Intel q9400 @ stock
Motherboard Lanparty P45-T2RS
Cooling Zalman CNPS-9500
Memory 8GB OCZ PC2-6400
Video Card(s) BFG Nvidia GTX285 OC
Storage 1TB, 500GB, 500GB
Display(s) 20" Samsung T200HD
Case Antec Mini P180
Audio Device(s) Sound Blaster X-Fi Elite Pro
Power Supply 700w Hiper
Software Ubuntu x64 virtualising Vista
Ok, being the total n00b that i am, I still know a bit of what is right and wrong. I have been suggested, by a software programmer to learn C first, as it is less object orientated that C++. C is not obsolete, although it will eventually go out, I am still willing to learn it.



Once I'm done learing the different C languages, i do intend to leanr some java/javascript, but ATM, I want to learn C.

Thanx to the most recent post, since it was actually helpful. Any Other help would be great!

For the record I'm a software engineer and am currently in my 3rd year of a 4 year Computer Science degree.

If you want to learn to write hacky, poorly written, bug infested code then start with C. If you want to learn to program properly and correctly start with Java.

The only two reasons to learn C in todays world is to:
1. Work for a large company who have to maintain a shed load of legacy code written years ago
2. Write very very heavily optimised programs where the key ingredient is speed. This takes a LOT of skill.

btw java/javascript? You realise they are two unrelated languages, right? The only real similarity is in the name...
 

dazed554

New Member
Joined
Feb 29, 2008
Messages
84 (0.01/day)
Location
East Greenbush, NY
Processor AMD Phenom II x4 945
Motherboard MSI 790FX-GD70
Cooling Zalman 9700
Memory 4gb Patriot DDR3 1333
Video Card(s) EVGA GTX 260
Storage 2x WD Caviar 160gb
Display(s) Sceptre 20''
Case Cooler Master RC690
Power Supply Thermaltake Purepower 500
I agree with those who say not to bother with C first as I never did. You do not need to immediately understand classes and such to get started with C++.

Anyway if you do decide that you want to learn C and later C++, these web sites can be very helpful:

http://www.cplusplus.com
http://www.cprogramming.com
 
Joined
Dec 6, 2008
Messages
3,014 (0.54/day)
Location
Northampton,UK
System Name Jaffakeik
Processor I9 12900K
Motherboard MSI Pro B660M-A WIFI DDR4
Cooling Arctic Liquid Freezer II High Performance CPU Water cooler- 240mm
Memory Corsair Vengeance LPX Black 32GB (2x16GB) 3600
Video Card(s) 7900XTX gigabyte OC edition
Storage WD Black SN770 1TB SSD M.2 2280 NVME x2
Display(s) TV LG C2
Case Phanteks Enthoo Pro 2 Full Tower Case Tempered
Audio Device(s) Mother board + Sennhiser HD650+ Elgato wave xlr + shure SM7B
Power Supply EVGA 1600w G+
Mouse Glorious Model 0
Keyboard Corsair RBG mini K65 + Steelseries Apex150
Software Windows 11
Benchmark Scores over 9000
I learned at High-school C++,Delphi,FOXpro,C# a little.but i forgot by now all.because it was not mine field of love
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,046 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
my suggestion is to learn c first, then expand to c++ or java depending on your project requirements. if you decide to use visual studio (which i strongestly recommend) then you can just create c++ projects and write normal c code
 
Joined
Nov 21, 2007
Messages
3,688 (0.61/day)
Location
Ohio
System Name Felix777
Processor Core i5-3570k@stock
Motherboard Biostar H61
Memory 8gb
Video Card(s) XFX RX 470
Storage WD 500GB BLK
Display(s) Acer p236h bd
Case Haf 912
Audio Device(s) onboard
Power Supply Rosewill CAPSTONE 450watt
Software Win 10 x64
hmmm idk about internet tutorials, i looked up a bunch to c++ and they won't get you far, you'd be best to buy a book off ebay or amazon, those tutorials only take you so far and don't fully explain everything that you can do, and what you can do with what they show. I'm just starting C++ and skipping C.
 
Joined
May 20, 2004
Messages
10,487 (1.44/day)
Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java ;)

And with Visual Web Developer you can write ASP's, which are basically php only they use .NET.
What webservers have JSP modules? I take it Apache does, how about others? IIS is the big downside of ASP.


Unless cross platform development is an issue Visual Studio is a great choice, both easy to use and powerful. And most of all, it's extremely well documented.

http://www.microsoft.com/Express/Download/
 

LORD_OF_WAR

New Member
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Location
H4><0RR1NG 1N2 TEH 4-RAMMS
System Name Custom Built Pr0n Star
Processor Intel C2D E4500
Motherboard Asrock 4CoreDual SATA2
Cooling 3 Chassis Fans and Standard Intel CPU Cooler
Memory 2GB DDR2 667
Video Card(s) Galaxy 8600GT 512
Storage 320GB Sata soldered to motherboard
Display(s) 17" Viewmaster
Case Thermaltake Wing RS101
Audio Device(s) Onboard
Power Supply Coolermaster eXtreme Power 600W
Software Windows XP
Well, if you really want to learn C, do it. You will find that it is a very powerful language. Why aren't you willing to learn C# or C++? Is it because it's an object-oriented programmimg language?

I have been advised to learn C first, and then C++,

Ok, bumping this thread back on track, (instead of advice, which i already have recieved) does anyone know of any good online C tutorials??
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
hmmm idk about internet tutorials, i looked up a bunch to c++ and they won't get you far, you'd be best to buy a book off ebay or amazon, those tutorials only take you so far and don't fully explain everything that you can do, and what you can do with what they show. I'm just starting C++ and skipping C.
I second that motion although I know someone that swears by C. I'll ask him if he has any advice next time I bump into him. If memory serves, he learned via a book. I'll try to get the title for the book for you.

C++ is an extension to C. C++ has some object oriented programming (OOP) concepts in it which are absent for C. As far as I know, most C code can be compiled by a C++ compiler.


C#/Java I think are a completely different ball game. Syntax is similar but I really can't see C/C++ helping much with either. VB is the best stepping stone into C#. Java was made in a room saturated with weed fumes. XD
 
Joined
Jul 29, 2007
Messages
392 (0.06/day)
Location
Portugal
System Name Lil'Lighty
Processor Intel Core i3 530 @ Stock
Motherboard Asus P7P55D
Cooling Artic Cooling Freezer Pro Rev.2
Memory Gskill Ripjaw 1600MHz 9-9-9-24 8GB
Video Card(s) MSI GeForce GTX650 OC 1GB
Storage WD Blue 500GB AAKS
Display(s) ASUS 20'
Case Aerocool Aeroengine II // Two 120mm Blue Fans
Audio Device(s) Creative SoundBlaster LE // Logitech X-230
Power Supply Corsair VX450W
Software Windows 8.1 Pro x64
Java language isn't so bad, but very similliar to C#.

Now books for learning C... the only one I can remember right now is one from Microsoft about C++.
 
Joined
Jul 29, 2007
Messages
392 (0.06/day)
Location
Portugal
System Name Lil'Lighty
Processor Intel Core i3 530 @ Stock
Motherboard Asus P7P55D
Cooling Artic Cooling Freezer Pro Rev.2
Memory Gskill Ripjaw 1600MHz 9-9-9-24 8GB
Video Card(s) MSI GeForce GTX650 OC 1GB
Storage WD Blue 500GB AAKS
Display(s) ASUS 20'
Case Aerocool Aeroengine II // Two 120mm Blue Fans
Audio Device(s) Creative SoundBlaster LE // Logitech X-230
Power Supply Corsair VX450W
Software Windows 8.1 Pro x64
Yes, I know he wants to learn C, but C++ is similiar in some ways to C, so a book about C or C++ would be good.
 

direct4

New Member
Joined
Dec 21, 2008
Messages
1 (0.00/day)
C is a foundation language, almost all modern programming languages, including Javascript, Java, and especially C++ are based off of the C syntax. If you learn C, it'll make learning the other languages much easier.

Java is not a language for beginners, so you should learn another language first. C++ is merely an extension to C (in fact, C++ used to be called "C with classes"), so, when you're learning C, you're also learning C++. After you have a firm understanding of C, then you can add to your knowledge and learn the features that make C++ what it is.

If you ever intend to program microcontrollers (IC chips that are sort of like a self-contained computer), mess around with the Linux kernel or modify the majority of the software that drives the internet, or make Carbon applications for Mac OS X, then you'll need to know C.

C also is a faster language than C++, and produces smaller code due to the fact it doesn't have all the extra features such as the vtable for objects and exception handling. It's also an easier language to learn and to read. Also, if you intend to take a compute class at college, they often require you take C first, and then C++ later.

C is very much alive and well.

As for the comment on Java.... don't bother with Java till you learn C and then C++, then your life will be WAY easier. Java is very slow at starting up and currently isn't suitable for use in programs that require speed-- thanks to the garbage collector that allows programmers to be lazy -- which is why Sun is working on an "unsafe" mode for java that throws out the garbage collector, which is the case if you write applications for the Android/G1 and other mobile phones (better get used to proper memory management under C/C++ first before attempting to code in Java for those devices).

I have a tutorial for the C/C++ language that you can get started with:
http://www.coderguide.com/Guides:C/C_Crash_Course

When the C advanced section is complete (that'll cover advanced things such as rarely used operators, linked lists, vectors, and sparse arrays), I'll start on one for C++. This is also one reason why Linux runs faster than Windows, among many other reasons.

As for only learning C++, the main supporter of that is the guy who created C++. I've read his book, and I, and many other long-time programmers disagree with his position... he also has one hell of an ego.
 

LORD_OF_WAR

New Member
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Location
H4><0RR1NG 1N2 TEH 4-RAMMS
System Name Custom Built Pr0n Star
Processor Intel C2D E4500
Motherboard Asrock 4CoreDual SATA2
Cooling 3 Chassis Fans and Standard Intel CPU Cooler
Memory 2GB DDR2 667
Video Card(s) Galaxy 8600GT 512
Storage 320GB Sata soldered to motherboard
Display(s) 17" Viewmaster
Case Thermaltake Wing RS101
Audio Device(s) Onboard
Power Supply Coolermaster eXtreme Power 600W
Software Windows XP
Well, at least someone was helpful . . . . .
 

Oliver_FF

New Member
Joined
Oct 15, 2006
Messages
544 (0.08/day)
Processor Intel q9400 @ stock
Motherboard Lanparty P45-T2RS
Cooling Zalman CNPS-9500
Memory 8GB OCZ PC2-6400
Video Card(s) BFG Nvidia GTX285 OC
Storage 1TB, 500GB, 500GB
Display(s) 20" Samsung T200HD
Case Antec Mini P180
Audio Device(s) Sound Blaster X-Fi Elite Pro
Power Supply 700w Hiper
Software Ubuntu x64 virtualising Vista
C is a foundation language, almost all modern programming languages, including Javascript, Java, and especially C++ are based off of the C syntax. If you learn C, it'll make learning the other languages much easier.

Java is not a language for beginners, so you should learn another language first. C++ is merely an extension to C (in fact, C++ used to be called "C with classes"), so, when you're learning C, you're also learning C++. After you have a firm understanding of C, then you can add to your knowledge and learn the features that make C++ what it is.

If you ever intend to program microcontrollers (IC chips that are sort of like a self-contained computer), mess around with the Linux kernel or modify the majority of the software that drives the internet, or make Carbon applications for Mac OS X, then you'll need to know C.

C also is a faster language than C++, and produces smaller code due to the fact it doesn't have all the extra features such as the vtable for objects and exception handling. It's also an easier language to learn and to read. Also, if you intend to take a compute class at college, they often require you take C first, and then C++ later.

C is very much alive and well.

As for the comment on Java.... don't bother with Java till you learn C and then C++, then your life will be WAY easier. Java is very slow at starting up and currently isn't suitable for use in programs that require speed-- thanks to the garbage collector that allows programmers to be lazy -- which is why Sun is working on an "unsafe" mode for java that throws out the garbage collector, which is the case if you write applications for the Android/G1 and other mobile phones (better get used to proper memory management under C/C++ first before attempting to code in Java for those devices).

I have a tutorial for the C/C++ language that you can get started with:
http://www.coderguide.com/Guides:C/C_Crash_Course

When the C advanced section is complete (that'll cover advanced things such as rarely used operators, linked lists, vectors, and sparse arrays), I'll start on one for C++. This is also one reason why Linux runs faster than Windows, among many other reasons.

As for only learning C++, the main supporter of that is the guy who created C++. I've read his book, and I, and many other long-time programmers disagree with his position... he also has one hell of an ego.

I'd quote this apart and correct it but to be honest you've made up your mind so there's no point.
 
Top