954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Straight C

I'm taking an Operating Systems course in which I need to write some really in depth programs (more specifically, along the lines of a terminal based program which implements many system level unix-like commands). However, the catch is that this must be written in straight C, which I have no experience with. I used to do a bit of C++ programming, but I haven't looked at any language other than php in about a year and a half.

Are there any tutorials on the web, etc that would be an overview of C for C++ programmers? (e.g. using printf as opposed to cout, etc, what syntax still applies and what doesn't, etc etc)

thanx, dani

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

I don't know about tutorials for C++ programmers learning C, mostly they're the other way around. If you're already fairly comfortable with C++ just go for a straight C tutorial and you should do just fine.

Do keep in mind that C has changed in recent years. The C standard was updated in 1999, introducing some new features. I would imagine that most tutorials on the web are based on C89 rather than C99. I don't know which you're required to use for your task.

If using older, more traditional C I would suggest you get hold of a copy of Kernighan & Ritchie's C Programming Language second edition. It's a good intro to C (still selling well), and with a C++ background I would expect you to be able to go through it pretty quickly, and soon pick up C I/O and other differences with C++.

Bob
Junior Poster
Team Colleague
129 posts since Feb 2003
Reputation Points: 15
Solved Threads: 2
 

That's a weird question. It's like asking for a book on "Windows 3.1 for Windows 2000 Datacenter Server" users. =) Ok, maybe I'm exaggerating a bit. I did use C though a long time ago when I was trying to create a Doom clone. I had most of the source code (which was in C) and it helped me out a lot. I have a book on C/Unix programming if you would like to take a look at. Very good book if you already know the basics of programming which I know you do. Let me know if you want it.

Here's two sites that I referred to when I was taking Unix Programming. They're ok, but they're the only ones that I can come up with at the moment (the ones I had saved on favorites):

http://www.cecs.csulb.edu/~tayek/326/c4cplusplusers.html

http://people.cs.uchicago.edu/~iancooke/osstuff/ccc.html

http://henson2.salisbury.edu/~dxdefino/CS450/IntroToC.htm

samaru
a.k.a inscissor
Team Colleague
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18
 

I'm taking an Operating Systems course in which I need to write some really in depth programs (more specifically, along the lines of a terminal based program which implements many system level unix-like commands). However, the catch is that this must be written in straight C, which I have no experience with. I used to do a bit of C++ programming, but I haven't looked at any language other than php in about a year and a half.

Are there any tutorials on the web, etc that would be an overview of C for C++ programmers? (e.g. using printf as opposed to cout, etc, what syntax still applies and what doesn't, etc etc)

thanx, dani

I use to do C++ and switched to C and I like it.The main big difference besides no OPP is the input and output .
Here is a site that helped me http://computer.howstuffworks.com/c.htm
It helped me learn lots of stuff like pointers pretty well.
BTW which OS is it?Linux,FreeBSD???

Elfshadow
Light Poster
27 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 
I use to do C++ and switched to C and I like it.The main big difference besides no OPP is the input and output . Here is a site that helped me http://computer.howstuffworks.com/c.htm It helped me learn lots of stuff like pointers pretty well. BTW which OS is it?Linux,FreeBSD???


Yay, now Dani can complete her project! It sure has been a loooong wait (4 years to be exact)...

John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

ROFL I didn't look at the date :confused:

Elfshadow
Light Poster
27 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You