Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to learn C language ?

Status
Not open for further replies.

jaz396

Junior Member level 1
Joined
Sep 16, 2004
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
232
how to learn c language easily

Hello ,

I want to learn programming in C language , is it easy to do that ,knowing that I dont have any software background ( only one course in FORTRAN) ? Which book do you advice me to read ? How many types of C ? (I have read something about system C ).
Is there any relation between C and C++ ? If no what do you sujest me to learn , as a hardware engineer?

thanx
 

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,435
Helped
64
Reputation
126
Reaction score
28
Trophy points
1,328
Activity points
16,326
ebook deitel and ditel

Ok the C language is a structured language .The language itself is very simple . Very easy .. But it relays in a lot of libraries to do useful things .
for example in C there is no notion of FILE .. File primitives are implemented by using calls to libraries .The same withs strings ,floating point numbers etc ..So basically the designers made it easy to learn .Although the language is very rich in posibilities of semantics .This becasue it's very poor data types ..
So basically i advice to go like this :

1)Start with the precompiler
2) Data types
3) control structures
4)pointer arithmetics
5) study the classic libraries

at every level don't go to deeply .. Just get a good idea ..you will come back for the specifics ..
 

cawan

Full Member level 2
Joined
Dec 28, 2002
Messages
135
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
1,306
solution manual turbo c robert lafore

You need to have fundamental of understanding about data type, function, structure, decision, loop control and etc. At the same time, you need some hands on to verify the correct operation of your program. I recommend Turbo C++ V3.0. The different between C and C++ is about the issue of object-oriented. Anyway, as a hardware engineer, C is more recommended because of the reason of hardware level compatibility. Most the controllers as well as the embedded systems are more likely to be programmed in C instead of C++ (most likely to be programmed in assembly language).
 

mandrei

Member level 3
Joined
Jan 10, 2004
Messages
64
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
889
free java textbooks thinking in java in chinese

Because you are an HW engeneer, here are some specific advices:

Try to make a litle project wich involves a simple uC with flash memory (example from 8051 family).

For example make a PCB board to light some LEDs via serial port.
Use C language to generate the program for uC then "burn" the flash(use Keil software to program in C )

Send comands to the board using an existing RS232 software.

Then replace this software with one written by you using C language in Windows ( see reference "Programming Windows" by Charles Petzold)

Now you have both: a HW board and SW to take control.
This is the starting point to add more functionality to the board and to learn how C is used in real life.

Good lo0ck!!
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,178
free ebooks on how to learn c

As you learn C, you will have many questions. The comp.lang.c FAQ is full of answers:
https://www.eskimo.com/~scs/C-faq/top.html

I learned C from K&R's classic book, "The C Programming Language" now second edition. It is short and compact, half tutorial, half reference. However, many folks prefer longer tutorials.

I started with Turbo C. Fine for learning, but its DOS memory management is pure agony. I now use MinGW (gcc for Windows). It's free.
 

cevitamic

Newbie level 6
Joined
Dec 15, 2003
Messages
13
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
192
turbo c by robert lafore solution manual

"The C Programming Language, 2nd Edition" is really cool for standard C learner!
 

zkai2000

Member level 5
Joined
Jul 25, 2004
Messages
94
Helped
0
Reputation
0
Reaction score
2
Trophy points
1,286
Activity points
907
deitel.com/cplusplus

I started with Visual C++, it's very easy to learn the basics...
There are VC++,Turbo C++,Borland,good old Vanilla C++, etc...
For text book, try Learning C++, by D&D
I can say C++ is more user-friendly..

Regards
 

tlihu

Full Member level 6
Joined
Jan 2, 2002
Messages
336
Helped
19
Reputation
42
Reaction score
13
Trophy points
1,298
Activity points
2,258
learn c language easily

I learned C language thru this book "C By Dissection."
 

FOL

Newbie level 3
Joined
Sep 3, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
22
very first step to c language

The book "The C Programming Language, Second Edition, ANSI C" is a good starting point. It is from the desinger of the language, it has examples and shows common phrases used in C.

Good luck
FOL
 

eemapir

Member level 3
Joined
May 30, 2004
Messages
56
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
364
easiest books to learn c language

hi
vc++ has a good compiler than tc
bye
 

waterman

Member level 5
Joined
Mar 27, 2002
Messages
80
Helped
2
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
562
forum index learning languages

Hi,

System C (mainly for ASIC development) is much different from C. At lease, the purpose, sematics and some syntaxes.

No matter what platform (PC or MCU) you choose, writing some programs and debugging them are the best way to learn C.

For PC, maybe you have to learn C++ after you know C well. (But some people recommend to learn C++ directly)

Personal opinion. The book "The C Programming Language, Second Edition, ANSI C" is a good and complete reference for C. But it seems not suitable for a beginner.
 

sztibi82

Full Member level 3
Joined
Aug 31, 2004
Messages
155
Helped
8
Reputation
16
Reaction score
4
Trophy points
1,298
Activity points
1,120
Hi.
As the guys mentioneted, get a book and try to understand it.
I know C, so if you have a few questions write at sztibi82@yahoo.com
Also i suggest to begin with C for dos and only then change to winwows because the win C is very difficult.

I hope i could help.
 

Antharax

Full Member level 4
Joined
Dec 31, 1999
Messages
208
Helped
14
Reputation
28
Reaction score
1
Trophy points
1,298
Activity points
2,865
Programming in C++ is NOT the same as programming in C.
There is a huge difference!

The C-language syntax is relatively easy (you don't have classes, inheritance, polymorphism, overloading, templates, exceptions, ... as you have in C++) although you can make a lot of mistakes ;-)

The C-language is for a different audience than the C++ Language.
C is probably the most usefull for Low-Level software (Device Drivers, ...) and embedded software.
C++ is more usefull for big software projects where C would be 'unmaintainable'

I think the best book for learning C is "The C Programming Language"
For C++ you should NOT start with "The C++ Programming Language"!!!

Antharax
 

tvc

Member level 3
Joined
Apr 26, 2004
Messages
64
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
71
Hi,

I think if you want to go to fast teack. You should get the book Thinking in Java by eckel. In side the book there is CD on C. It will help you go very fast.
You could look google.com and look for "Thinking is Java and goto that web.
 

gnudaemon

Member level 1
Joined
Sep 16, 2004
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
338
I always use www.cplusplus.com as reference library. I know the existance of MSDN but I hate Microsoft so I never use that.
 

strongson

Newbie level 3
Joined
Dec 21, 2001
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
41
If you family with a assembler language, such as x86 assembler language, you will find that the C language is so simple, funny, easy and comfortable.
 

asrafiel

Newbie level 3
Joined
Oct 8, 2004
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
34
The Deitel's book of C is very good, but remember: google is your master.

The main difference between C and C++ is that C++ supports a object orientation approach. In C++ we have many classes and functions that native C don't have.
 

ME

Advanced Member level 4
Joined
Mar 14, 2002
Messages
1,309
Helped
55
Reputation
112
Reaction score
40
Trophy points
1,328
Activity points
14,861
I learned C/C++ from the book "C++ How To Program" from deitel.
https://www.deitel.com/books
https://www.deitel.com/books/cppHTP4/index.html
It's the worlds best selling C++ textbook, so I guess it must be one of the best; but there are hundreds of C/C++ books on the market.
You can also get Student Solutions Manual for the book.
I think it's a good book foor learning, but later on it could be easier to use a book like ""The C Programming Language" as reference book, when you want to look up a specific command and how it works; it is explaied in shorter examples in this book. You can download it from the eBook upload forum.
But for learning I think "C++ How To Program" is a good book.

They also make a book called "C How To Program", I guess this book is similar to the C++ book, but without all the extra C++ stuff and more focused on pure C code.
I don't know this book.
I do some embedded C programming, but I learned C from the C++ book, so when I started with embedded programming it was a bit confusing in the beginning to find out which C++ parts that was not a part of C. But you soon find out, so I don't see it as a very big problem. I haven't read all the C++ parts of the book yet because I don't do any PC programming but only C programming for embedded devices.

There's also another Microsoft invented extension of the language, called C# (pronounced "C sharp").
I don't know this language, this is most used for Windows programming. I have heard it is more similar to Java, which I don't know either.
 

snabilat

Member level 3
Joined
Apr 24, 2004
Messages
61
Helped
3
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
666
For a first time user , i recomend "Programming in C" by Robert Lafore.
its a good book for a start . than u could move to "Embeded C".
also check the site:https://www.learn-c.com/.
i hope this would help.
 

sshahid47

Advanced Member level 4
Joined
Nov 5, 2004
Messages
101
Helped
15
Reputation
30
Reaction score
2
Trophy points
1,298
Activity points
974
hi,
when u have the basics on C , read the book "Advanced C " by herb schildt, a real good book teaches u about the internals in C.
as a hardware guy stick to C the best language ever.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top