So, I decided to...
teach myself C programming. I'm a first year Computer Science student. I taught myself bash scripting before taking this course, and that was during high school(same time I started using Linux). Unfortunately, they don't teach C in our University. They introduced C++ in the first semester, just the basics, we didn't even get to functions and other stuffs like arrays. Second semester is almost done and they're teaching us Java and I heard it's gonna be Java all the way. Maybe a few look back to C++ but that's it. No C. I know C is almost like C++(It doesn't matter, they won't teach us that much C++ anyway). But I've been reading on the internet and have read that Linux kernel is mostly in C(I wanna contribute someday, you know ) For some time I've been looking for some books in the library and found this book entitled Sams Teach Yourself C Programming in Linux in 21 days. It's year 2000 edition. So I was wondering if this book is good(for those who have read it). The book is 12 years old now, can't help to think that some (or maybe most) of the things here are outdated. Is it? Has a lot of things changed in C language in 12 years? And also this might be a stupid question, but i'm gonna ask anyway. Should I do my programming in Linux or Windows? Most people in our place use Windows(seems like I'm the only one who knows and uses Linux) so if I were to try and port my programs to, say, my friend's or school computers to test my codes, is it gonna be hard and gonna need a lot of tricks? I know the book says "C Programming in LINUX" but I want to test it on both systems but do it mostly for Linux. And one more reason why I want to do it on Windows too is because my box broke last week(stupid ants made their nest inside my harddisk) so I'm on my Mom's laptop right now and this doesn't have Linux because my Mom doesn't want Linux on it. VM is not an option because this laptop is kinda slow. "Hey, there are distros out there that can run on slow machines" No, just no Linux on this laptop. So I might have to start learning C on this laptop. And one more question, does GNU C Compiler work well on Windows? How do I get it running on Windows?
I don't even know if this is the right place to post this topic on Getting Started with Linux forum but, hey, I'm trying to get something started here. Any help is appreciated.
jeromesevilla (at) hotmail (dot) co (dot) uk
Thanks.
Comments
-
First lets look at C, GCC has C99 (revision in 1999) support, but has limited C11 (2007 - 2011 revisions) (http://gcc.gnu.org/onlinedocs/gcc/Standards.html) support, so little has changed since the book was published that can or is being in kernel. That all means that your book should still offer most of the content that you will be working with. To get some real experience get a kernel hacker book, which will explain more about the common implementations and the submission process.
There are ports of GCC like http://www.mingw.org/http://www.mingw.org/ for windows, but they are often incomplete, gcc was built to work in Unix environments. Most of the code you write in Linux may work in windows, but the different libraries may cause the most trouble when compiling in windows or vice versa.
As for your school programming, since you will be working in java, it is multi-OS thanks to the VM usage, so most programming will work on all operating systems.0 -
Glad to see you here.
You made a good[the best] decision , Learning 'C'
"I know C is almost like C++ "
No. C++ is almost like 'C', with some more feautres and filling the de-merits of 'C' .
If you really want to learn 'C' in a deep, avoid some sort of books, which is based on the Number of Days to complete [ without considering the reader's capacity ] .
Get one copy of "The C Programming Language" By, the 'C'-language creators, Ritchie and Ken Thomson.
I bet, you will enjoy that.
you can use Mingw in Windows as Mfillpot told, and turbo c if you want , till you get rid of ants.
If your harddrive alone affected, remaining parts are good means, you can do,
1. remove your hard disk
2. Get one Linux Live CD/DVD or even USB
3. Boot from CD/DVD/USB
4. Learn 'C' pgm, do 'C' pgm and dont forget to copy your work to another medium, [ just a pen drive].
If you want soft copy of that book, just let me to know
Have a great stay here,0 -
Thanks for the quick reply.
@mfillpot - thanks for that info. Now I'm relieved that the books in my University's library about C are still good(They're mostly 88 and 90's edition. Probably the 2000 edition is the most current they have).
@crond - I'll try your suggestion. I never thought that these insects can break electronic devices. And about the soft copy of the book - that'd be great. Is it for free? hehe.
I have a question. I have Ubuntu 11.10 and Fedora 15 KDE CDs. Does GCC come with these distros?0 -
" Is it for free? "
No doubt in that. I am very very happy to share with anyone if they interested.
Right now am in work place. Will send to your id, you mentioned in your first post, once I reach my home.
Regarding the last part, I prefer Fedora, since thats my very first Linux distro .ANd moreover, the "vi" editor that you will use to do 'C' program, in Fedora is good, whereas in Ubuntu you need to update the same for easy use.
If you are installing any one of those, in your hard drive you need to choose the "GCC" option to install [ in fedora ] .
If you are trying as Live CD/DVD boot without hard drive, it will be there. I remember, I used it .0 -
Yay, thanks!
I've been using Fedora until my box broke. And yeah, I've used vi on Ubuntu and it sucked.
0 -
vim powah!!!
You can learn C in almost any operating system, only the tools will change.
Regards,
Marc0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 37 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 693 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 145 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 6 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 150 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 370 Off Topic
- 114 Introductions
- 173 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)