User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 402,404 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,007 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 1084 | Replies: 23
Reply
Join Date: Apr 2008
Posts: 14
Reputation: RyanLeaf is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
RyanLeaf RyanLeaf is offline Offline
Newbie Poster

Learn C as a second language?

  #1  
May 8th, 2008
Hello,
I am currently learning (or really just begun) Assembly (my first programming language, by the way) and am wondering once I become somewhat good at Assembly, should I start picking up the C language. I know that several languages are based upon it, and I am even planning on doing work in the Objective-C language (i think it's a Macintosh-specific language), which states C as a pre-requisite. Java and C# are also based upon C, which I think means if I learn C I'll have an easier time picking these languages up.

If yes, what are some good resources / books that are useful for a beginner in C.

Thanks,
Ryan Leaf
Last edited by RyanLeaf : May 8th, 2008 at 9:04 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,697
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 36
Solved Threads: 878
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Learn C as a second language?

  #2  
May 8th, 2008
See the Read Me Starting "C" at the top of this board. You posted right over it.

Its good that you are studying assembly language but I would not have picked it as my first programming language because assembly is not considered a good way to program. That is, the language is chucked full of jumps and gotos. You will have to unlearn all that in order to code effectively in any of the higher-level languages. In other words, assembly language teaches you a lot of bad habbits.

The second reason not to learn assembly as a first language is that there are very few people who actually program in that language any more. Most programmers code for years without even seeing any assembly language code.
Last edited by Ancient Dragon : May 8th, 2008 at 10:34 pm.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Dec 2005
Posts: 3,405
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 21
Solved Threads: 385
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: Learn C as a second language?

  #3  
May 9th, 2008
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Learn C as a second language?

  #4  
May 9th, 2008
i learned assembly years ago as my first language (not counting BASIC, Pascal and Fortran, which i never did anything meaningful with)...

in the early 90's it was important to know Assembly to do embedded programming, because the C compilers for embedded controllers were terribly inefficient -- and expensive if you were a student or hobbyist. the "Assembly is Better" mindset continued even into this decade.

But now the C compilers rock, and only the most specialized apps or processors would ever need such low-level programming.

so, as some one who learned on assembly, and loved all its peculiarities.... I hate to say it... stay away from Assembly if at all possible. at the very least, don't start learning to program on it, for reasons Dragon pointed out already.

do yourself a favor and learn C and learn C++... C is especially suited for microcontroller and embedded work, while C++ in particular will give you the Object-Oriented foundation on which you can expand in any other direction as needed.

dont bother with C# unless you are immediately going to go work in a Microsoft shop. Definitely do not get bogged down in some Macintosh "objective c".... no one uses Macintosh for C programming in the industry, that I've ever seen. i mean, if you want an object-oriented version of C... it's already here: it's called C++. And it's portable to any OS. Vendors reinvent the wheel because they want to lock you into their proprietary hardware or software. don't do it. if you know C++ you can easily pick up C# or "Objective-C" if the need ever arises.

if you learn C you'll always have a skill in high demand. if you learn C++ you'll have the additional benefit of understanding Object-Oriented programming, and can take that knowledge and apply it to any number of languages, such as C# and Java, and can likely get hired based on your C++ background even if you dont have the specific OO language they prefer.


.
Last edited by jephthah : May 9th, 2008 at 1:26 pm. Reason: .
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,697
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 36
Solved Threads: 878
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Learn C as a second language?

  #5  
May 9th, 2008
Originally Posted by jephthah View Post
i learned assembly years ago as my first language (not counting BASIC, Pascal and Fortran, which i never did anything meaningful with)...
That is a big contridictory sentence Assembly could not have been your first language if you had learned others prior to that.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,697
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 36
Solved Threads: 878
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Learn C as a second language?

  #6  
May 9th, 2008
I think the only people who write in assembly to day are either 1) compiler writers, or 2) program EPROMs.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Learn C as a second language?

  #7  
May 9th, 2008
i should have qualified "assembly was the first language in which i did any meaningful work" ... i just played with the others. Basic/Pascal/Fortran are, for all intents and purposes, completely useless languages -- unless you're an Excel Programmer (Basic) or a Nuclear Engineer (Fortran)

...

i was going to say that i program eeproms using C... if driving external hardware to manipulate data bit-by-bit, counts... probably not. i guess you've still got to understand basics of low level assembly programming.

but that should all be secondary to first learning the higher level languages like C/C++ ... assembly should come later.



.
Last edited by jephthah : May 9th, 2008 at 6:55 pm.
Reply With Quote  
Join Date: Sep 2006
Posts: 263
Reputation: Colin Mac is on a distinguished road 
Rep Power: 2
Solved Threads: 16
Colin Mac Colin Mac is offline Offline
Posting Whiz in Training

Re: Learn C as a second language?

  #8  
May 9th, 2008
Microcontrollers are mainly programmed in assembly still. C has advantages when it comes to things like decision making. Assembly has advantages when you need precise delays. Other times, the program would just end up one liner C statements anyway, so there isn't much point.
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Learn C as a second language?

  #9  
May 10th, 2008
im not sure what kind of microcontrollers you mean, but the ones i deal with ... scientific instrumentation and medical products ... are all programmed in C.

now there's always an occasional macro in assembly, but they're short and sweet, and few and far between.

assembly programming is a rare skill these days, because the demand is but a fraction of what it was 10 or 15 years ago.
Reply With Quote  
Join Date: Sep 2006
Posts: 263
Reputation: Colin Mac is on a distinguished road 
Rep Power: 2
Solved Threads: 16
Colin Mac Colin Mac is offline Offline
Posting Whiz in Training

Re: Learn C as a second language?

  #10  
May 10th, 2008
The most popular ones such as PICs and 8051 derivatives are mainly programmed in assembly.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 1:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC