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
- 50 LFX Mentorship
- 103 LFX Mentorship: Linux Kernel
- 555 Linux Foundation Boot Camps
- 297 Cloud Engineer Boot Camp
- 119 Advanced Cloud Engineer Boot Camp
- 52 DevOps Engineer Boot Camp
- 54 Cloud Native Developer Boot Camp
- 4 Express Training Courses
- 4 Express Courses - Discussion Forum
- 1.9K Training Courses
- 18 LFC110 Class Forum
- 7 LFC131 Class Forum
- 25 LFD102 Class Forum
- 150 LFD103 Class Forum
- 17 LFD121 Class Forum
- LFD137 Class Forum
- 61 LFD201 Class Forum
- LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 598 LFD259 Class Forum
- 102 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- LFD273 Class Forum
- 2 LFS145 Class Forum
- 24 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 3 LFS203 Class Forum
- 69 LFS207 Class Forum
- 300 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 11 LFS244 Class Forum
- 34 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 140 LFS253 Class Forum
- LFS254 Class Forum
- 1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 92 LFS260 Class Forum
- 130 LFS261 Class Forum
- 32 LFS262 Class Forum
- 79 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 17 LFS267 Class Forum
- 17 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS281 Class Forum
- 221 LFW211 Class Forum
- 168 LFW212 Class Forum
- SKF100 Class Forum
- 902 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 209 Networking
- 101 Printers & Scanners
- 85 Storage
- 761 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 141 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 478 Linux System Administration
- 41 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 77 Network Management
- 108 System Management
- 49 Web Management
- 66 Mobile Computing
- 23 Android
- 29 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 536 Off Topic
- 131 Introductions
- 216 Small Talk
- 21 Study Material
- 817 Programming and Development
- 275 Kernel Development
- 508 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 59 All In Program
- 59 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)