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

Learning to Program C

Joined
Oct 23, 2008
Messages
29 (0.01/day)
Likes
4
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
#1
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!!!
 
Joined
Jan 7, 2008
Messages
519 (0.14/day)
Likes
60
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
#2
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.13/day)
Likes
65
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
#3
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
 
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Likes
4
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
#5
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.10/day)
Likes
51
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
#6
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.13/day)
Likes
65
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
#7
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.02/day)
Likes
8
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
#8
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
2,955 (0.89/day)
Likes
491
Location
Northampton,UK
System Name Ruy-Love
Processor i7-6700k 4.0Mhz
Motherboard Asus Gamer Pro
Cooling Dark Rock Pro 3
Memory G.Skill DDR4 3000mhz 16GB
Video Card(s) Zotac GeForce GTX 980Ti AMP Extreme Edition
Storage vertex 2 ssd 120GB, samsung evo850 SSD 250GB
Display(s) AOC 27''
Case HAF-X FULL TOWER
Audio Device(s) Integrated
Power Supply EVGA SUPERNOVA 750 G2
Mouse NYTH ROCCAT
Keyboard -
Software Windows 10
#9
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
17,172 (3.43/day)
Likes
18,149
Processor Core i7-4790K
Memory 16 GB
Video Card(s) GTX 1080
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 7
#10
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,684 (0.99/day)
Likes
402
Location
Smithfield, WV
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
#11
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.
 

DanTheBanjoman

Señor Moderator
Joined
May 20, 2004
Messages
10,488 (2.10/day)
Likes
1,331
#12
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/
 
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Likes
4
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
#13
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
21,092 (6.22/day)
Likes
10,217
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#14
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.10/day)
Likes
51
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
#15
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.10/day)
Likes
51
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
#17
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)
Likes
1
#18
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.
 
Joined
Oct 23, 2008
Messages
29 (0.01/day)
Likes
4
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
#19
Well, at least someone was helpful . . . . .
 

Oliver_FF

New Member
Joined
Oct 15, 2006
Messages
544 (0.13/day)
Likes
65
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
#20
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.