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
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 801 Linux Foundation IT Professional Programs
- 357 Cloud Engineer IT Professional Program
- 181 Advanced Cloud Engineer IT Professional Program
- 83 DevOps Engineer IT Professional Program
- 149 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 138 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 19 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 154 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 34 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 48 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 155 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 121 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 25 LFS268 Class Forum
- 31 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 10 LFW111 Class Forum
- 261 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 758 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 806 Programming and Development
- 304 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 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)