tags:

views:

4227

answers:

109

For those who know or are learning C: Why did you choose to learn C?

Was a school or job requirement? Curiosity? Boredom? Personal growth? ...

I'm especially curious to know how many learned it to better understand the inner workings of their language of choice. If this is your reason, was it prompted by Joel's suggestions?

+40  A: 

God, it was almost 30 years ago, who remembers? ;-)

Seriously, UNIX was the New Thing, and C seemed to offer a lot of the advantages of assembler, while being more productive.

And, sure enough, once I'd learned C, it did indeed offer the power and flexibility of assembly language, while offering the clarity and maintainability of assembly language.

Charlie Martin
I'm pretty sure you meant 'while offering the clarity and maintainability of a high level language' :)Regardless, I'm just like you, 25+ years ago, SO much better than the alternatives at the time (and still pretty sweet, if you ask me)+1
KevinDTimm
I like it as written :P
Neil Williams
I think I've heard that saying before somewhere, pretty sure it was intentional.
ryeguy
I meant it as I wrote it, and it's either a quote or a close paraphrase, but I'll take credit for it.
Charlie Martin
fwiw, Charlie, I'm pretty sure I saw (roughly) that quote go by in the cloud of answers to the "Java: all the elegant simplicity of C++ combined with the blinding speed of smalltalk" quote someone floated in the early java days.
simon
OH yeah. But the C/assembler riff predates it. There were some others, about Prolog and APL as I recall, when I was in grad school -- which was significantly before Java was even a tiny acorn.
Charlie Martin
somehow that doesn't surprise me at all. "all the x of a, and all the y of b" seems a pretty well worn template, truth be told. I wouldn't be surprised if a marketing guy told it first either (rapidly followed by a coder flipping the irony bit)
simon
Yup, here we go: "C is often described, with a mixture of fondness and disdain varying according to the speaker, as "a language that combines all the elegance and power of assembly language with all the readability and maintainability of assembly language". http://www.ccil.org/jargon/jargon_18.html#SEC25 --- Straight from the jargon file, and I'm sure it was there when GLS still maintained it.
Charlie Martin
I stand by my original remark (though I do understand where the quote came from). Reason being, I find it extremely easy to read as opposed to assembler. But, I'm guessing if I wrote assembler for nearly 20 years, it would be pretty clear to me too :)
KevinDTimm
Same reason for me. C was the first language I could stomach the performance hit of writing at a higher level than assembler. It was also more portable relative to other languages at the time.
Van Gale
@kevin, you need to dig up the Obfuscated C contest.
Charlie Martin
Charlie, I always hated that Obfuscated stuff - offensive to my engineering sensibilities (essentially anathema to why I code)Just my $.02 :)
KevinDTimm
Oh, yeah, it's the blue-language humor of computing. But it *does* demonstrate what can happen when a C programmer turns to the Dark Side.
Charlie Martin
+8  A: 

I learned C because I wanted to try programming in a language without GC (having only used Java and Logo), and C seemed the easiest. It really did open up a whole new world. Now if only I could manage to learn Haskell...

Zifre
http://learnyouahaskell.com/ is a great site to learn Haskell
Michaël Larouche
+3  A: 

I was fed up with my "text editor" whinging about "compile errors" whenever I accidentally hit F5. God knows if I remember what the IDE was called, but it was quite old, and ran on an Amstrad IBM-compatible.

Looking at the help was probably my first programming mistake.

Rob
Sounds like it might of been Turbo C from Borland.
mctylr
+3  A: 

I had some C code to debug and maintain.

It was probably the third language I learned after BASIC and Pascal. I remember my cousin being excited about obtaining a C compiler because it would let him do "structured programming", which was a buzzword at that time.

I still use C for programs that interact with binary data and where processing speed is critical. In addition, I've got lots of code in C that still needs to be debugged an maintained.

Jon Ericson
+1  A: 

In order to be able to do low level coding (e.g. OS or drivers), and to be able to get involved in projects that require C programming (i.e. compiler writing).

none
What?! Compiler writing doesn't require C. I'm writing one in Python right now (or atleast I was until SO distracted me) :S
Wallacoloo
of course compiler writing does not necessarily require C knowledge, but most C or C++ compilers are written in C or C++ and not in Python, Haskell or LISP. And even there, knowledge of C would still be pretty handy.
none
+1  A: 

I learned it when I was first getting into programming, and at the time, I didn't know much about the different languages around. I chose C because it was recommended from a friend who did use C a lot. Now, I keep using it because I enjoy programming in lower level languages.

DeadHead
+73  A: 

C is part of the curriculum of many Computer Science programmes, for obvious reasons: it allows one to program on a relatively low level (esp. compared to more modern languages), while still being able to write useful programs with ease. It is also the de facto system programming language, and requires the programmer to know how the machine works. And despite its age, it is still very popular and certainly not outdated.

Myself I learned C as part of an undergraduate course at university.

Stephan202
+3  A: 

Req for my CS degree.

Muad'Dib
+4  A: 

I learned C because I wanted to know what was happening below the code I wrote. I started high and kept working down 'til I hit assembler. I did they way before Joel made the suggestion.

ctacke
+1  A: 

I originally learned C because my school's CompSci program started you out with it.

I picked up C again recently because I wanted to program in D and it can interface with C libraries, assuming you have a wrapper. I have to know some C in order to properly convert it to D.

Now, I'm glad I know a little C because it gives me more insight into the underworkings of higher level languages and since the C-Style syntax is so prevalent, I have a good leg-up on the most popular languages.

CodexArcanum
+5  A: 

I learned C when I got a job where the code was mostly written in C. In retrospect it was written in C because C was, to some extent, cross-platform. We were able to find a subset of C which, when we added enough #ifdef's, would allow the same code to compile on VAX, DEC-10/20, MS-DOS, PC-DOS and CP/M.

John Saunders
+2  A: 

I always liked to program. I coded in BASIC and then in assembler on the C64 for years when I was a child.

I met C when I was 12, but my mind did not get it, as I could not grasp the very fact that another language could even exist. Then, I went to the university, and I learned Fortran, but it wasn't good. But there was internet, and so the chats (you had to use telnet to connect)

I wasted my time on these chats, and I got curious about understanding how they worked. They told me you could download the code, so I did it, and started peeking into it. The chat was quite similar to a textual adventure, and I wanted to make it even more similar, like, you know, those things that were first called MUD and then MMORPG.

So I started coding it. At first, I just translated the messages in my native language. As I delved more into the 7000 lines of code, and started reading some C books, I learned C.

So basically it was to fuel my preferred way of wasting time: chatting ;)

Stefano Borini
+7  A: 

Best way to do game development on MS-DOS. This was in the early 90's.

Michael
+2  A: 

I was developing on the Amiga, and AmigaBasic wasn't cutting the mustard.

GoatRider
A: 

...but I haven't taught myself C! Doing just fine without it, thankyouverymuch.

Henrik Paul
+18  A: 

I'm currently working with C (a lot!) to program to a device.. I have a Velleman k8055 interface board, with a USB interface that I would like to connect to a (hacked) Western Digital My Book World, which runs a minimal version of linux.

Sounds like a mouth full, but it is actually pretty fun to talk directly to the device, take measurements (such as temperature), and then activate a switch, while storing all this information into a SQLite database, and then connect to the SQLite database through a web interface .. and all that because of C!

I love C ;-)

MiRAGe
+2  A: 

I loved computers!

Mehrdad Afshari
And I'm sure you still do! :)
Stephan202
@Stephan202: Oh really? :-? Never thought about that :-" Now I understand why gals were jealous of my MacBook Air.
Mehrdad Afshari
;) Poor gals! Perhaps you can accommodate them by applying some time-sharing :D
Stephan202
@Stephan202: I'll happily do so as soon as they can make themselves as thin as the Air! :))
Mehrdad Afshari
+1  A: 

I used to know Pascal, and I felt it wasn't a mainstream language anymore. So when I was 15 or so I got hold of a Borland C++ compiler and learned C. I later learned C++ from a book because I missed the classes and virtual functions that Borland Pascal supported

Uri
+3  A: 

Because other than BASIC, it was the only game in town on an IBM PC that was not Fortran, Prolog, or some "obscure" enterprise-level language. Turbo C had recently been released which made it that much easier to gain access to it and it was certainly more affordable than other languages. Turbo Pascal was nice, but it seemed too "rinky-dink" to be considered a real language. That plus low-level access via asm, and C was the way to go for me.

Michael Todd
+1  A: 

If I didn't, I would have failed CS 240 C Programming. :)

I'd say that was a pretty motivating reason.

samoz
+4  A: 

For me, like others, it was years and years ago. It was the Spring of 1982 and I was in my Freshman Year of college at UC Santa Cruz. Was just completing the two quarter Intro to CS sequence and after Karel the Robot and UCB Pascal.

We were a Berkeley Unix shop and I had been learning and playing with the C-Shell for several months. C seemed the next logical step and so I purchased the 1st Edition of K&R and had at it that Spring and Summer.

Worked as a programmer writing systems for the University that Summer with a focus on integrating the Unix-based systems and the legacy mainframe systems (hey, we still had punch card readers around).

I took to C like a duck to water. Loved it and have had it in my tool kit ever since. Put those skills to work after graduation testing Apple's C compiler for MPW. Later went back to Pascal to work in Object Pascal, then Objective-C, some C++, and then onto Ruby and JavaScript.

I think my story reflects how a lot of us come to be using a particular language or technology. It isn't part of a grand strategy. Rather, it is just how things played out.

That said, I am glad with how things turned out in my case.

Jordan
A: 

I had to learn it to prepare for some systems-level courses in university (e.g., operating systems, etc).

Ben Collins
A: 

I got bored of Turbo Pascal's strict type system, and all demo coding tutorials were in C.

abababa22
A: 

I learned some C in school, but never really applied it in the real world until I started working with microcontrollers.

AVR RISC chips and AVR-GCC.

Dave
A: 

I learned C as part of my undergraduate studies in CS. We had worked with Java up till then but it was used in a computer graphics course. After that it was used a few times in my undergraduate and graduate studies, for example in compiler construction. Now I work with C all the time in embedded systems as part of my job.

Albi
+12  A: 

It was what Nethack was written in. It was also the 'professional' language back when I started looking at non-BASIC programming

johnc
++ for Nethack! The codebase is kind of a mess, of course (dirty dirty macros, and is it tabs or spaces?)
guns
:) true but inordinately fond of it still
johnc
A: 

Required prerequisite to C++ course :P

Since then, I've come to appreciate the austere beauty of C by itself though - mostly through Unix system API's.

ceretullis
A: 

I m a CS student it is the first programming language they taught us

Yassir
A: 

We happened to have a compiler for it.

We didn't have compilers for any of the other programming languages there were books for in the house.

And I was really bored of qbasic.

Kim Reece
A: 

I learned C because that's what we use at school (although it's more C++), and I'm glad I did. I also encourage people to learn the C standard library instead of the C++ library. It's much better and it doesn't hide how things work.

toto
A: 

Because I didn't know any better and thought C was the only thing other than BASIC.

NotDan
A: 

I learned C during the very first year of my Electrical Engineering degree. The second year I had a very succinct C++ course.

The only time I re-used C, it was for a Microcontroller programming course. That was the last time I used it.

Costo
A: 

As an electrical engineering student, I learned C because it was essential to any kind of low level programming.

Most microcontroller manufacturers offer a C compiler for their particular brand of assembly (generally in the form of gcc extensions), so it makes it really easy to write embedded code for multiple platforms.

Joel Potter
A: 

i got a part-time job while in college at the Boston Children's Museum during the mid 70s. They had a PDP11-40 computer and it was running this new kind of operating system called Unix Version 6 that had been licensed from AT&T. Apparently the museum was the very first licensee of this OS

The only way to write programs for the kids was using a language called C, so I had to learn that...

Scott Evernden
A: 
  • Programming for embedded devices, servomotors microcontrollers
  • Calling functions to talk with the kernels of UNIXish Operating Systems
  • Optimized number crunchers (SSE, funky memory organization)
Monkey
A: 

For the lulz!

Seriously, to write "Hello, World!" and see it appear on the screen. I actually made a noise out loud the first time I did that.

Genericrich
A: 

I learned BASIC, Fortran, Pascal before learning C. Some of the work we were doing was not sensible in Fortran (a GKS - Graphical Kernel System - graphics library for Fortran), so we used C. It gave us 2 extra letters of freedom for choosing function and variable names (8 instead of 6!) which mattered because the externally visible names all started 'g', the non-public names all started 'gk', and the driver specific names all started with a driver identifier such as 'gk0p', leaving only 2 characters for the 'real name' of the Fortran functions! Yes, gk0paa, gk0pab, ... they existed; C gave us a let out. Cool. (The ultra-gurus on the team coded the machines in microcode though!)

This was a long time ago, though - 25+ years ago. Prototypes were a nice addition to the C language too, many years later. And Sun had these cool workstations using M68000 chips.

Jonathan Leffler
A: 

Because the only other thing we had was Fortran. (I'm older than I look!)

Martin Beckett
+2  A: 

C enable you to see the data structure more closely. In term of pointer, memory management, resources allocation, initialization of variable. and lot more..

Syed Tayyab Ali
A: 

I wanted to be a hacker. Back then the advice was set up a linux network and learn C. So I did. I bought the K&R book, did all of the exercises and then...nothing. Probably due to lack of creativity and broadband (it took forever to download lcc at 14.4kbps). I didn't program again until a few years later when I took pascal in high school.

Dan.StackOverflow
A: 

I learned C in order to write a program for my boss Carl Franck, who needed a C program to help design an X-ray mirror. At that time I already had moderately extensive experience in APL, PL/I, IBM Pascal/VS, and Digital BASIC, as well as enough FORTRAN and JCL to be dangerous. Kernighan and Ritchie was a pleasure and still is to this day.

I was awfully glad when ANSI C introduced prototypes, though...

Norman Ramsey
xcramps
A: 

C was part of curriculam. I liked C, once got the basic then it was fun

+2  A: 

I learned C as a gateway to C++. K&R looked a lot less intimidating than the C++ Programming Language. K&R is still the best programming book I've read to date.

When I learned C Java was just launched. I actually learned Java 1.0. Most other modern languages either didn't exist or hadn't escaped the niche communities in which they were created.

Steve Rowe
A: 

I learned C because I needed it for my work. For me it was the next step on from FORTRAN. FYI, I started out in a scientific applications environment.

It gave my program the chance to interact with the OS, an RTOS in this case, so that I could look at the args provided to me when the program was invoked.

It was so cool to be able to get access to the program args without some magical OS trickery.

It did not take me long to get proficient in it. I was very proud, but I could not understand why people said C was little more than a portable assembler.

I was naive.

Five years later, after some experience with regular expressions, awk, perl and some early C++ I fully understood why C is a portable assembler. After all with such a stingy library you could hardly call it a platform.

+5  A: 

I have never thought about it until this day.

My teacher first taught us data structures using lisp in the first two months, and once we understood it we make the switch to C

It was pretty easy.

That semester ( 2nd semester ) ruin my relationship with the subsequent teachers that was not as crazy as my first one. They insisted I could make loops using for and while's but the only artifacts I used were if and pure recursion.

By 9th semester and once the original teacher was not longer at university I switched back to "normal" style, and use if's in conjunction with for's and while's and ( omg ) do{}while's ... :-S

So, I learned C at school. I have never had the chance to use it at professional level.

Actually I remember the day we start learning Java we said:

It's very easy, we just take this C source code and add public class Something { at the beginning and } at the end. We know Java already!!! ...

And indeed my first java programs were pretty much like this.

OscarRyz
+1  A: 

My parents forced me to take up a summer course in GW-BASIC during the summer holidays after 10th class. I had forced them into a position where they had to constantly chide me for wasting my time and being "good for nothing". I fell in love with computers while studying GW-BASIC and soon managed to prove that I was no longer "good for nothing". I studied C as a follow up to GW-BASIC.

Thanks, Ma. Thanks, Dad. Love you both. :D

Vulcan Eager
A: 

I learn't it at university. I don't think there is an engineering or computer science degree that does not teach C. I reckon, it should be the first programming language everyone learns. It gives a good grounding into the inner workings of the computer.

Naren
A: 

It was the "next" language. I cut my teeth on Applesoft Basic back in the day, and programmers who wrote working C code were making many times what I was making as a tech writer / support monkey. I'm on C# now, and I love making breakthroughs in my own personal knowledge in that space just as much as I did when I discovered how to do the next thing in C.

John Dunagan
A: 

Well I am just learning C, just doing this and that and in the meantime try doing a few things with C. I'm not realy good at it, but I'm learning it to make a few programs for secondlife, my first language would be LSL (realy easy) and from out there I need to learn PHP and such to do what you can't do in an LSL script.

In C I might in the future work to make sculpting (SecondLife Feature) easier.

billyy
A: 

I learned C to get a better job. That was a long time ago. But learning it made me a much better coder because it offered a lot of power that had to be used carefully. For example, learning memory managment was key to being effective in the absence of garbage collectors. Doing so made me stronger as a coder. Unless you paid attention to honing your skills you condemed yourself to being assigned only fluff projects. So in that respect, learning C forced me to become a wiser coder.

yetanotherdave
A: 

Because a friend of my father's gave my a book, and a some floppies that had Turbo-C and it was so much cooler that MS Quick Basic.

Months later some friends got there hands on Turbo-Pascal, and I knew I was onto the real winner (C)....

Simeon Pilgrim
it's unclear whether you're saying C or pascal is the winner
kjack
C, definitely C
Simeon Pilgrim
A: 

I learned C++ before I learned C.

C++ was a natural progression from Pascal for me (well, with no formal programming training, it seemed like a good idea at the time). It could do more, and I thought it was more powerful, but it allowed you to use the same basic procedural syntax. I didn't use actual 'C' until years later when I was at university. Since then I have found it helpful when modifying some open source code like audio/video codecs.

thomasrutter
A: 

I couldn't find a pascal compiler for my Linux box (that was before I had internet at that computer) so I couldn't program using the only language I knew at the time (Delphi 3). However they did have this pascal to c compiler. But the output was horrible, so I had to learn c to hack that.

tomjen
A: 

I knew assembler (Amiga 68000) when I got to University. I was frustrated with all the lisp and prolog, and wanted to do something that produced an executable, and that involved bits, bytes, and pointers. So I taught myself C alongside my AI courses.

justinhj
A: 

For programming games.

Badri
A: 

Because my Apple II only had two compilers (Pascal and C), and most of the docs and examples were in C.

As soon as I went off to college and got access to a real computer (DECstations! OSF/1!), the first thing I did -- before even signing up for any computer science courses -- was teach myself Lisp.

(P.S., if you want to better understand the inner workings of Lisp, C isn't going to help a whole lot. Almost all of the Lisp compilers I've worked with have been self-hosting, so it's just Lisp and assembly down there.)

Ken
+1  A: 

I could not get my first data structures program to work using Pascal (Thank God).

ojblass
+2  A: 

Flexibility with pointers. This particular feature alone compels me to learn C, otherwise I would have stayed with Pascal.

Michael Buen
+3  A: 

Because C is as close as one can get to assembly language speed, without losing your mind.

Also because the Linux kernel is written in C and I needed to mess with it a little.

Graycode
A: 

I first learned C because at the time I wanted to learn C++ and back then it was suggested to me that one should learn C and then C++.

I'm glad I did though, because so much of the software I write today still requires (for the most part) C:

  • Windows device drivers
  • hard real-time applications on embedded systems
  • UNIX kernel modules
  • firmware on micro-controllers
Dr. Watson
+2  A: 

Because it's fast.

Mark Ingram
A: 

C was my second programming language at Imperial College during my first year of Electrical and Electronic Engineering degree. They taught us Pascal, then C and finally C++/Java. This later become useful for a third year embedded design project as part of my BSC project.

MeThinks
A: 

I learned it as part of a HNC in Electronic Eng I took on a day release course back in the early 1990's. We had a pretty good lecturer which was essential since we never touched a computer during the entire course ! I went out and bought myself a copy of "Turbo C" to play with it home and it all made sense but I remember that a lot of the other course members struggled. Oddly the first programming we did for that qualification was 8085 assembly language a year before.

Just one of the many joys of British Polytechnics.

IanW
+59  A: 

After learning A and B it seemed to be the logical choice. Or at least that's what my pre-school teacher told me at the time. I just wanted cookies.

+1 wish i'd gone to your preschool!
kjack
But why just stop at C? :)
RobS
LOOOOOOOOOOOOOOOOOOOL!
Andrea Ambu
Followed by C++? That can only mean more cookies right?
xenon
Seconded the LOL \o/
Camilo Martin
@RobS - C is for cookie. That's good enough for me...
Derek Adair
I wish I could do +9001
polemon
@Derek Adair: Cookie, cookie, cookie starts with 'C'!
bcat
A: 

Because it was how you wrote any sort of reasonable program on the Amiga. I mean, you could do it in BASIC, and there was okay library support for that, bit if you wanted to do anything sophisticated or performant at all, you pretty much had to do it in C.

That and, at 17 years old, I thought I was finally beyond BASIC and wanted to try something more sophisticated.

I was never very productive in C, though. Besides a bit of C++ in university, I didn't write significant amounts of C code till I got a job. (And at that point, it turned out to be a very useful skill to have).

Darcy Casselman
+3  A: 

I started with C because it was the first language I stumbled across back when I was 11ish years old (I am still so thankful for that!). I bought Borland 5.0 from Best Buy with my allowance. Before that, I was building push-pull audio amplifiers - I guess programming was just a much less expensive logical progression.

Whatever the case: C/C++ has kept me happily employed ever since. It’s amazing what you can do once you conquer C!

NTDLS
A: 

C was actually the last programming language I took a course in. Ironically before starting to maintain legacy code written in ANSI C, I decided that in order for me to really become more actualized as a programmer I needed to be able to grok the concept of pointers and memory management. All of my education and experience was with languages with garbage collection (Java, C# etc.) and I really needed to get "closer to the metal" without delving into a low-level language like assembler.

In sum, I'm glad I did--not just for the obvious purposes of my job but as mentioned before C strips away a lot of abstraction and enables you to grasp more thoroughly what happens under the hood, as many popular language interpreters(Ruby, PHP, Python) and operating systems are written in C.

Learning C for the programming practitioner is analogous to learning Latin is for the linguist (save the fact that C is far from dead!).

By the way--ditto to the comment about the K&R. It's the definitive work.

T.

Todd
A: 

In 1982, someone handed me a desmet c-compiler on a 5-1/4" floppy.

I was writing in COBOL and compiled BASIC at the time. I wanted to show my kids the difference between an interpreted language and a compiled one. A simple program, to count from 1 to 10000.

First, interpreted Basic. . . and wait for the answer Then, BASCOM (compiled Basic) and wait for answer, although not as long.

OK, let's try C. Compile it, and run it. Holy Crap!

I never wrote another BASIC program.

I didn't have a COBOL compiler on my IBM PC 8088, COBOL was on a WANG mini -- but I very quickly became aware that C programs were a lot smaller for the same task.

Working on a PC with quick edit-compile-run cycles did wonderful things for my productivity. (Yes, oh a 5MHz 8088).

I'm still writing almost exclusively in C.

Bram
A: 

I wanted to write a Pascal compiler.

I was high school and couldn't afford any of the commercial Pascal compilers. There was a free compiler called Tiny Pascal but it was worthless for any real work.

So, I decided to write my own.

I purchased a copy of the Software Toolworks C compiler ($39.95) and set about writing a Pascal compiler with it. By the time I had written the lexical analyzer and started working on semantic analysis & code generation, I realized that C was so much more flexible that I forgot all about Pascal and dropped the project.

Ferruccio
A: 

For a professional application where speed and closeness to the processor was vital (doing real-time video processing with 33 MHz processors and 640Kb RAM!!) there really was no better option, rather than going assembly-insane. It wasn't really any question of options, really.

AlexanderJohannesen
A: 

Because it was there, it dazzled me with its inherent beauty, and since it indeed was a language that was easier to be productive in than MC68000 assembly, which was what I mostly used at the time I started learning C.

unwind
A: 

I was given a choice between C and VAX MACRO-32, (not to mention BLISS, and TECO). I was encouraged by the hackers around me to choose C for practical work, but to learn as much as possible about as many other languages as I could.

I never wrote a line of MACRO-32, but I did maintain a real application in MACRO-11 for PDP-11's running RT-11 and TSX+. I have written non-trivial programs in TECO on that same PDP-11. Thankfully, I never had to write a line of BLISS for either the PDP or the VAX, but I did once have to read some to answer a question about a utility that wasn't covered in the documents. VAXen at the time commonly shipped with a copy of the VMS source kit (for the kernel and most system utilities) compiler listings on a deck of micro-fiche, and I still have a copy in a drawer somewhere.

Somehow, I did avoid being traumatized by early exposures to BASIC and FORTRAN while in high school...

Since I ended in embedded systems, I have never regretted learning C as a first "real" language.

RBerteig
A: 

C was a part of my college curriculum and that's how I started learning C. I learned most of the programming concepts through this language and even today (I have worked with C++, Java, ROR, etc) I love this language the most. Simply the best.

Pratheeswaran.R
+1  A: 

To get a huge consultation fees when the 2038 year problem arrives!

tomash
A: 

Because I love learning from my mistakes. C gives you plenty of opportunities to make mistakes if you aren't careful.

AnnaR
C most certainly allows you to make more mistakes!
Dinah
A: 

1) it was the language to program Windows in (when I started with Windows 2 and 3)

2) it was possibly the most powerful language at the time (very subjective, but to do what I wanted, it was the next best thing to assembler)

3) it was low level enough to do anything.

4) it was fun

5) it was a gateway to understanding how the computer worked in a more structured manner than Assembler

Xetius
A: 

I learned Borland Pascal first, around 1992. There was not much Pascal in Dr. Dobbs and programming books, so I learned C and C++ to be able to absorb more books and articles about programming.

Tom
A: 

I was finishing up my masters in math and needed a couple of courses. There happened to be a C course that fit into my schedule so I took it. My main motivation was partially that that it seemed like that sort of thing one should know (before starting my Masters I'd been passed over for a job I wanted in part because I didn't know C) and mainly that while writing numerical code in matlab or python is both quick and easy it doesn't run very fast, so knowing something that was fast would probably be quite handy.

After having taken the first course I went on to take the advanced course as well and basically came to the conclusion that I really liked programming in C.

+2  A: 

Finding out how much of today's software either was 1) influenced by it, 2) abstracted by it, 3) inherited directly from it or 4) created with it.

Anywho, it seems to be the backbone of many languages/ideas/methodologies... can't be a bad thing to learn I think.

Rev316
+1  A: 

At the time--it was the only game in town really. Virtually all new coding for PCs was done in C.

Bill K
+1  A: 

I switched to C from Pascal when I started programming for Windows 3. The only available good book at that time was "Programming Windows" by Charles Petzold. All samples was on C. So I had no choice ;-)

Dmitri Kouminov
+1  A: 

I needed a compiler for some odd embedded device, and I couldn't use a suitable Pascal.

Learning the inner workings was not so much of a problem, since it maps 1:1 to Pascal.

The usual syntax gotcha's like = vs == (and most importantly, the routine to avoid making them all the time) took some time longer. And still.

Marco van de Voort
+1  A: 

I started learning C because I wanted to program video games. All of my research at the time seemed to indicate that if you wanted to be an SE for console and PC game development, then C and C++ were the ticket.

Chris Reynolds
+1  A: 

I started learning C because I was annoyed at the limitations of the Pascal compilers I was using. However, the C compiler I had at the time (on a TRS-80 Model 4 running CP/M) was excessively awkward to use, so I didn't get very far.

When I got to grad school, it was what everybody was using. Most of the intro to programming courses were in C, and all the neat available software I was interested in (this was after Richard Stallman was pushing Free Software, but before "open source" was used as a near-synonym) was in C. I did find that I didn't want to learn vi and C at the same time, so I learned C using Lightspeed C on my Macintosh SE.

David Thornley
+1  A: 

In college my first language was assembly, but as I worked more on embedded systems I realized that C would help me to make more portable and easier to manage code. C is great for low level work (I do embedded programming), and is very close to assembly which I like.

A: 

I needed to use C at work, at the same time it was the hot language at my University. The entry level Comp Sci classes were still in Pascal but within 2 years they switched over to C (late 80's). We had a huge VAX cluster and a couple of little BSD VAX 780's at school and everyone wanted to use the Unix machines. All the hot jobs after graduation demanded C.

At work, C was the best way to wring Unix Workstation performance out of 286's and 386's. A PC was 2 grand and a Unix Workstation was $40K. Any other language was a better choice, it could be argued, assuming you were making that choice on a big, fat, expensive Unix workstation like Masscomp/SGI/Sun/Apollo*/Whatever. (But not a VAXStation. There were no good choices for a VAXStation, because no matter what you chose, you were still stuck on a VAXStation).

Don't forget, C is everyone's favorite portable Macro Assembler for DEC-like CPU's. Comparing it to high level languages just isn't fair. Remember CPU's ran from 20MHz to 90MHz and the pre-Synchronous DRAM was slow, slow, slow. C was the only option for both portability and performance. If you chose Pascal you had to write to a C API anyway. If you chose Ada you got stuck with a 500K runtime link linked to your program (effectively tripling its size). If you chose Smalltalk it wasn't leaving the University environment.

*OK So Apollo wasn't exactly Unix. It was still better than using a VAXStation.

kmarsh
A: 

In the days of yore, it was the only language that really allowed you to exploit the capabilities of the machine you were using, especially if you wanted to do graphics programming. Whether I found myself on PC's, Sun's or when I got my first dream job coding phigs/GL for SGI (R.I.P) in the late 80s/early 90's you had to use C.

the relative portability also helped, so if you had a toolbox of goodies that made your life simpler, C would be a good bet to have it working in short order on any new machine/architecture you might encounter.

It was also the fun and productive language to code it - 5000 lines of C was joy and could do so much in those days. 5000 lines of fortran, pl/1 or cobol in those days seemed more like a tax audit and 5000 lines of assembly, while very very fast was more like some form of morse code - C had the right amount of expressiveness that you can understand WHAT was being done and not how.

MikeJ
A: 

I was 14, found a book at the library about c-programming and read it. That was what got me stuck on programming.

When I became old enough to really understand programming, it was too late. I had become a C programmer.

Some days I wish that book had been about fishing, visual basic or motorcycles. But I suppose that's the irony of fate.

Silfverstrom
+1  A: 

I actually picked up a C++ when I was 11 and it was basically C with cout, cin, new and delete up until the end of it where they explained a bit of STL.
I never found a good use for it since I like OOP too much.
yeh you can do that with C as well but it's a pain in the ass.
I actually see no reason to learn C by itself, it's useful if you are used to it but you can also program embedded/RT in C++ and it will be pretty much the same imo.

the_drow
+1  A: 

I started because I needed to translate C code into something else (usually Delphi) First only headers, later also code.

Later when I got more proficient, and I did some microcontroller work in C. Mostly because while there were other compilers and languages, the C compiler was maintained best.

Marco van de Voort
A: 

Because, nothing beat c.

plan9assembler
+1  A: 

I'm assuming you mean straight C, not C++?

In all honesty.. my dad made me'ish. I was coding in BASIC when he went "ok, time to learn something better... here's a book and the F1 key... oh, by the way, I uninstalled BASIC... good luck" and walked away on to a plane (seriously, he flew out a lot then).

I initially hated it and refused to use it... until I needed to get some stupid things done... lo and behold, it wasn't so bad. Funny thing now is, I work with people who code in C# and there have been times we needed to code in a non-managed environment (we were handed stuff from outsiders and didn't have a way around it). Had it not been for me knowing straight C, we likely would have been screwed.

It's amazing how many people live and breathe with OOP and can't deal without it.

oh, and if it matters.. my first baby was encryption... seriously starting with ROT+X (not just ROT13; still funny realizing that ROT is where I started... haha) and moved on from there. I liked hiding things... until several years later I realized I had nothing useful to hide.

Nazadus
C and C++ are different languages...
Eric M
"I liked hiding things... until several years later I realized I had nothing useful to hide." ... that made me laugh. :)
mizipzor
A: 

Because typecasting an 8 bit int to & from a 32 bit int in pascal was a real pain in the neck.

Eric M
A: 

I learnt C++ during uni (I started of my own accord) so naturally C was only a hairs-breadth away but I've never really coded for C even if the C++ code I've written (say for a Win32 program) has never had any real C++ code in it (such as classes).

C/C++ are practically the most used systems programming languages in the world so it's a good reason to know them, IMHO.

The only problem I find now is that the magic is lost after several years of programming in it. Granted, coding these days is almost completely implementation and not lack of programming skill but there was something really cool about getting your first few programs up and running and them doing some cool things. Even beginners CLI games were fun to attempt.

Oh well. back to work!

Nick Bedford
+1  A: 

I learned C because, while I knew TRS-80 Basic, some Z-80 Assembler and had taken a class in Pascal, the BSD Unix that we used on our PDP-11 and, later, Vaxen was written entirely in C. Essentially, there wasn't anything interesting that you could do on our big machines (and they were intimidatingly big) without C.

So I learned it. It wasn't that hard when you had an entire operating system serving as a set of examples.

Bob Cross
+1  A: 

I learned C because it was clear because everyone else was learning C. I held out as long as I could, programming mostly in assembly language until about 1993.

Nosredna
+1  A: 

I had written in a variety of languages, BASIC, FORTRAN, Assembler, etc. when I read a quote by Dijkstra, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." Of course, I took this as a personal challenge and bought K&R. It took me all of 2 weeks to write my first commercial c app--which became a best seller.

PrgTrdr
+1  A: 

The very first programming book I had the chance to lay my hands on was a book about C. However, the first "real" application I wrote was in C++. It was actually a few years later that I discovered that they were, in fact, different languages.

mizipzor
+1  A: 

I didn't go to a JavaSchool. I went to a VBSchool :)

There was one class on C++ near the end, and I thought it was a shame we had been shown VB all that time.

Later, at work, I got handed a C project. That got me going, but the lack of objects threw me off a bit at first.

MPelletier
A: 

When the only compilers available for the platform you want to develop for are Assembly and C, it's a good time to learn both.

Wallacoloo
+2  A: 

When I was in college, Pascal was the de facto language.

I hate typing capitalized letters during programming. That's why I wrote fewer than 500 lines of COBOL in my entire life, given COBOL was the business language. I didn't like those BEGIN / END in Pascal either.

In the second year, there was a telecommunication project. The requirements are:

  • there are 3 PCs, say, A, B and C
  • each is equipped with 2 serial ports
  • each PC is connected to other 2 PCs, in a ring
  • each PC should be able to send/receive files from any of the other two, even one of the three connections is broken
  • for example, if the connection between A and C is broken, A should be able to send files to C via B

that was a serial port programming exercise, interrupt driven stuff.

In the same time, there was another COBOL project. I forgot the requirements ;-) Anyway, our team (5 folks) should finish both projects before certain deadline.

Luckily, we make a (clever) decision to split the team into two group. Three folks (Keith, Wayne, Alison) were in the COBOL team. Another folk (Terran) and I were in the comm port team.

Terran and I bought the K&C book. OMG, it's still the best computing book I've ever read. The language is powerful. The syntax is elegant. The { } saves lots of BEGIN / END typing ;-)

That's how I picked up c.

p.s. anyway, as a side note, we scored 'A's in both projects. That was year 1989/90.

ohho
A: 

I started my learning of programming with Pascal. Soon after that i started learning C++. Actualy ACM contests helped me a lot in it.

kilotaras
+1  A: 

I ran a pretty successful dial up BBS in the late 80's / early 90's. The source code to the software that I ultimately settled on was available, written in C. In the space of a few months, I learned several hundred very bad habits by studying the code that took years to shake.

At around the same time, Linux booted with GNU and I was a UNIX refugee. The sheer and utter joy I felt when I finally got both to compile and boot was .. well .. pretty awesome. That was on a 386 DX/33. To this date, I still do not take having a pre-compiled version of gcc for granted.

Its hard to describe how cool having a computer in your house running something UNIX-like made you at that point in time. I fondly remember a friend of mine calling me to report that he finally got some 50 Ohm terminators and now had an Ethernet network in his house. I blew his bubble by saying "I got Linux with GNU to boot".

It wasn't long after that jobs started appearing for people who knew how to write portable programs. Keep in mind, POSIX first appeared in 1988 and adoption was slow, GNU/Linux came pretty damn close out of the gate. It was and is truly a developer's OS. I made some beer money, but it was mostly just a hobby. Debian meant the start of a career for a lot of people.

Writing services and device drivers now feeds me. It will continue to feed me. Almost every wildly popular interpreted language that I can think of is written in C. Every working kernel that I've ever seen is written in C. And wow, now we have hypervisors!

I know PHP, Perl .. some Python, BASIC and others but C remains my favorite language. First love, I guess.

Tim Post
+1  A: 

I never really learned C, I am still learning it everytime I read K & R I find something new.

anijhaw
A: 

I learned C because I was trying to write a Super Mario Bros. clone (my parents wouldn't buy be a Nintendo) and I was getting sick of the peeking and poking to do anything interesting in BASIC. I never did end up finishing that game. Programming, in and of itself, became the goal.

guidoism
A: 

I think I started learning C, because it is the fundamental computer language and developed in conjunction with an operating system namely UNIX. The C language truly tied together how The UNIX operating system worked, with software development practice for that environment. This is, of course not unique to UNIX. We see similar approaches in Objective-C under NeXT or Mac OSX; or Visual C++ under Windows. The compilers here introduced specific syntax that helped extend the concepts that are represented within the operating system, in a way that would be natural for the programmer to use.

Of course this would bring us to lisp, a language so advanced and sophisticated, that an operating environment has yet to be built to fully understand the depths at which lisp works. This is akin to the Europeans building the rail tracks over the mountains in Austria, when an engine did not exist that was powerful enough to go up along these tracks. however, they knew, that one day an engine will come which would be able to close the journey. Lisp is that track, and Lisp OS is that system. All Hail Emacs. ( whoops, are my prejudices showing? -hehe )

Elf King
A: 

As an electrical engineering student, the only programming classes I ever took were Fortran and assembly for embedded systems design. I used the assembly language as needed to program 8051 or 68HC11 and equivalent microcontrollers.

My primary programming language—if you could call it that at that time—was Matlab. Matlab was great for my needs, as I was almost always dealing with matrices consisting of complex numbers and wanting to plot results.

When I got into graduate school, I took a computational electromagnetics (CEM) course that required you to develop three different programs:

  1. Finite-Difference Time Domain (FDTD) solver
  2. Finite Element Method (FEM) solver
  3. Method of Moments (MoM) solver

Since all I really knew were Matlab and assembler, I decided to write my first project—the FDTD solver—in Matlab. This turned out to be a colossal mistake. I found Matlab's Achilles' heel—stepping through matrices one individual element at a time, which is required in an FDTD solver.

It took 2–3 hours to run the solver, and then many times I'd find an error. Even when I reduced the problem size, so that the matrices were relatively small, the time it took to debug was still unbearable.

For my second project—a FEM solver to calculate the characteristic impedance of a coaxial cable—I decided that in the 5 weeks we were given to complete the project, it would be faster for me to:

  1. Teach myself C
  2. Develop an FEM solver in C

That decision was one of the better ones I've made. With a copy of The C Programming Language, 2nd ed. by Brian W. Kernighan and Dennis M. Ritchie, I taught myself C.

I still have the source code from back in 1999 when I took the course. It consisted of one function—main()—and was some pretty ugly code. But it sure was faster than waiting on Matlab.

Matthew Rankin
A: 

The first thing I -really- learned was LPC (my first experience with coding was on a MUD), and it spread like wildfire after that. C, then a ton of high-level languages, then C++ for good measure... can't get enough. C and its syntax will always be my favorite, though.

mway
+1  A: 

I went to the software store intending to buy a Turbo Pascal, as that was what I had learned in school. I was on a very limited budget, and Turbo C was about $10 cheaper. Even though I didn't know what "C" was, it looked similar to Pascal, and I wanted to save a few bucks.

Best damn decision I ever made. :)

abelenky