473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

c as a beginner language

Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?

Jan 25 '06 #1
18 2890
Hi,

Yes I'd agree C is a difficult language for a beginner as regards
pointers - I didn't find data files or the rest particularly difficult.
It's more techie that VB (or even classic BASIC), but it's power is
great. Maybe you should start with C++ - string handling is easier? If
you can program in C, though, you should be able to switch to other
languages easily. You cannot say the same of VB - and in my opinion
that takes up far too much disc space!

However if you do struggle though comprehending pointers (and files in
your case) - you should appreciate the power of the language - it does
pretty much anything! I've just reacquanted myself with pointers and
pointer arithmetic - something I never really got the hang of a few
years back when I first learnt C. Now I feel confident with pointers,
and can make some use of the powerful features of pointer arithmetic
etc. C also has the power to be platform independent - you can use it
on a PC, a Unix machine (or Linux), or Apple Mac (I believe), plus
other less well known systems with relatively little changes to your
program.

I like the language, and am glad I struggled with learning it - I can
now do some wonderful things with it. My advice - get a nice friendly
book, which you are happy with the writing style of, and study it in
depth in your weaker areas.

Online resources I've found useful are:

www.cplusplus.com
typing "man <c command>" - eg "man open()" at a google window - to see
the manual page for the command
http://www.codeproject.com/ - mainly PC (and Microsoft) languages.
Tutorial @ "www.physics.drexel.edu/courses/
Comp_Phys/General/C_basics/c_tutorial.html" (unfortunately the page had
disappeared today)
http://www.lysator.liu.se/c/bwk-tutor.html - online copy of Brian
Kernighan's "Programming in C: A Tutorial"

when looking up things online - search for "C language" - otherwise
you get lots of useless info - the letter c appears in loads of stuff!

If you want: email me off this newsgroup and I'll see if I can help!

Cheers
Andy Burgess

Jan 25 '06 #2
"mi*********@gmail.com" <mi*********@gmail.com> writes:

keep on using c. btw, visual basic is not a language, it's an IDE.
c is simple. c is difficult. just feel it by learning.
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?

Jan 25 '06 #3
mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files.
pointers are hard and I found the syntax of C pointers
counter-intuitive
(this was when I was learning-it seems quite obvious now :-) )

data files I don't understand. I've used a variety of languages and
generally found files not a problem (well, ok, they were a bit of a pig
in
FORTAN IV...). C's file handling has always seemed fine to me.
Perhaps you are using some of the less easy to use C functions
(fscanf()?). Rather than fgets(). Could you post some code (working
or not!) so we can try and work out what your problem is.
What do you think, am i being
too pessimistic or thats how it happens for a beginner?
your first language is going to be hard.
Are there better languages than c for a beginner?
I don't have a good answer to this one. I used to recomend Pascal
but that's really dropped off the charts. Python maybe? But there are
worse things than C. C is fairly small. And well defined.
For instance visual basic
I wouldn't recomend locking yourself into microsoft right at the
beginning...
or i should just keep the confidence of improving?


what book are you learning from?
--
Nick Keighley

Jan 25 '06 #4
Le 25-01-2006, mi*********@gmail.com <mi*********@gmail.com> a écrit*:
Hi guys, am learning c as a beginner language and am finding it rough
Yes, it is.
especially with pointers and data files.
Pointers are rough in every langage. The problem with
C is that you can not do a lot of things without pointers.
What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner?


Yes, Pascal, a subset of Ada, a subset of C++, caml.
You can also try Python, Ruby...

Marc Boyer
Jan 25 '06 #5
mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?


There are definitely better languages for a beginner (and for just about
anyone) than C. Have a look at Oberon for instance. It's a successor to
Pascal and Modula, but unlike Pascal it's not limited in any way. An
entire operating system (with the same name) was constructed with Oberon.

Here are some links:

http://www.oberon.ethz.ch/ (Home of the Oberon)
http://www.zel.org/aos/o2report.htm (Language Report)
http://www.modulaware.com/mdlt49.htm (Comparison to C++)

Freestanding Compilers:
http://sourceforge.net/projects/ooc
http://www.excelsior-usa.com/home.html

--
I am the "ILOVEGNU" signature virus. Just copy me to your
signature. This email was infected under the terms of the GNU
General Public License.
Jan 25 '06 #6
August Karlstrom <fu********@comhem.se> wrote:
mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?


There are definitely better languages for a beginner (and for just about
anyone) than C. Have a look at Oberon for instance. It's a successor to
Pascal and Modula, but unlike Pascal it's not limited in any way.


Then it's not suited for beginners. One of Pascal's great strengths in
teaching is that it does not just suggest, but downright enforces,
strict style. _First_ one needs to learn to work within safe limits, and
_then_ one can start justifying why one needs to step over them. Any
language without limits is too likely to give a student bad habits.

And yes, that very much does go for C as well.

Richard
Jan 25 '06 #7
Richard Bos wrote:
August Karlstrom <fu********@comhem.se> wrote:
There are definitely better languages for a beginner (and for just about
anyone) than C. Have a look at Oberon for instance. It's a successor to
Pascal and Modula, but unlike Pascal it's not limited in any way.
Then it's not suited for beginners.


Well, you're wrong. The "unsafe" low-level features are only available
if the pseudo module SYSTEM is imported. Without SYSTEM as a client a
module is completely type safe.
One of Pascal's great strengths in
teaching is that it does not just suggest, but downright enforces,
strict style. _First_ one needs to learn to work within safe limits, and
_then_ one can start justifying why one needs to step over them. Any
language without limits is too likely to give a student bad habits.


Not so with Oberon. The language is so clean and well structured that
good style comes almost naturally; it's a language that, opposed to C,
discourages obscurity and encourages clarity. Moreover it's simpler than
Pascal in the sense that it has fewer language elements.

Why not have a look at the language before you jump into false conclusions?
August

--
I am the "ILOVEGNU" signature virus. Just copy me to your
signature. This email was infected under the terms of the GNU
General Public License.
Jan 25 '06 #8

mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?


First of all, programming is a skill, and like any other skill it
requires non-trivial amounts of time and effort to learn; you're not
going to figure everything out all at once. Usually, you have to take
some things on faith and hope that they'll make sense in the future.
Eventually, things start to click, but it can be weeks or even months
before some concepts will be clear.

C is terrible as a teaching language, and pointers are just the tip of
the iceberg. It was designed for people who were already expert
programmers and wanted something a bit more flexible than what was
available at the time. There are a ton of subtle little gotchas that
you just have to learn about over time, and the syntax can be less than
intuitive now and then.

*Any* language is going to be tough for a beginning programmer, since
you're having to learn how to program in addition to the language
itself. Some languages are tougher than others, though, and C falls
well into the "tougher" category. Unfortunately, my experience with
other languages isn't all that broad. I've heard from others that
Python or Ruby make good teaching languages. I think languages like
Java and C# would work pretty well as teaching languages, provided
you're willing to learn OO concepts on top of everything else.

Another thing to consider: C is a product of the early 1970s, and it
shows. It provides no high-level support for networking, or file
system management, or graphics, or sound, or any of a number of other
features that more modern languages like Java and C# do. If you want
to start writing Windows apps, you might be better served starting with
something like C# and the .Net framework.

Then again, switching gears at this point might be even more
counterproductive than just plugging along in C.

Jan 25 '06 #9
I taught C Programming to engineering and science majors in college.
It was a Freshman level course, and while I was teaching it, I
remembered struggling through it as well. At the same time, though,
the things the students were learning we very basic and intuitive to me
by that point. I taught it kids who were in their first every
programming class, and we got into recursion, pointers, memory
allocation, bitwise and array stuff, and even linked lists (with
structs). I don't know one person in my classes that didn't struggle
through it at one point or another.

I'm now working as a consultant and writing in C++ and doing things
that are talked about lacking in C in the other replies. Basically, if
you want to be a great programmer, you have to understand C very well.
You'll learn all about how computers work (OS, compiliers, etc), which
will help with Object Oriented languages. I consider C the easy
language in my portfolio because I know it so well...this is good for
me!

When I graduated college, I took up VB and Visual C++ in a matter of a
month or two. C took me a few years to master. I don't have problems
learning any language now because I had to struggle so much in the
beginning.

Keep sticking to it, because you will be further than you think once
you start to understand the basics.

-ben

Jan 25 '06 #10
Richard Bos wrote:
August Karlstrom <fu********@comhem.se> wrote:

.... snip ...

There are definitely better languages for a beginner (and for
just about anyone) than C. Have a look at Oberon for instance.
It's a successor to Pascal and Modula, but unlike Pascal it's
not limited in any way.


Then it's not suited for beginners. One of Pascal's great
strengths in teaching is that it does not just suggest, but
downright enforces, strict style. _First_ one needs to learn to
work within safe limits, and _then_ one can start justifying
why one needs to step over them. Any language without limits is
too likely to give a student bad habits.

And yes, that very much does go for C as well.


Actually Pascal has very few limits, but in general there is only
one way to attain a particular desire. I used it succesfully for
many years in embedded processing, and needed a very few
extensions. putport and getport were primary. Others were largely
for efficiency, such as mask and lor for bit banging. The benefits
of proper typing and range checking are immense, especially in
critical medical software.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Jan 25 '06 #11
I'm struggling with C but at the same time I'm also enjoying the
challenge. It is a powerful little language with some mind numbing
little intricacies but the flexibility and control you have makes up
for it.From my own experience I found that reading from various
sources(books, web, forums etc) helps to clarify diffcult concepts.
Stephen Kochan's book on C programming does a great job of explaining
pointers.
http://www.amazon.com/gp/product/067...Fencoding=UTF8

Jan 26 '06 #12
I'm another beginner programmer who has started with C. (Well apart
from some BBC BASIC game programming when I was a kid)
I'm finding concepts are starting to click, and having a butchers at
the other languages about I am pleased to see that loads of the syntax
is based on C.
My reasoning for starting on C was that it is important to understand
what goes on at a lower level (however Assembly seems a little bit too
hardcore to jump straight into).

On learning pointers: I put this off for a bit, but when I was feeling
particularly eager, I spent 2 long nights getting everything to work.
It fried my brain but forcing myself to use functions that I didn't
really get proved very helpful.

I recommend this URL: http://cslibrary.stanford.edu/103/

I'm now looking at learning Java, C++, Perl and Assembly.

Jan 26 '06 #13
August Karlstrom <fu********@comhem.se> wrote:
Richard Bos wrote:
August Karlstrom <fu********@comhem.se> wrote:
There are definitely better languages for a beginner (and for just about
anyone) than C. Have a look at Oberon for instance. It's a successor to
Pascal and Modula, but unlike Pascal it's not limited in any way.
Then it's not suited for beginners.


Well, you're wrong. The "unsafe" low-level features are only available
if the pseudo module SYSTEM is imported. Without SYSTEM as a client a
module is completely type safe.


That's theory. Practice is that if there is a reasonably obvious bypass
of a security measure, a learner _will_ find it, use it, and learn bad
habits in the process.
Why not have a look at the language before you jump into false conclusions?


It's not about this particular language. It's about languages that are
good for advanced programming by necessity not being good for learning.
They have opposite requirements.

Richard
Jan 31 '06 #14

mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?


My advice is, like the other people who have posted, get a good
tuitorial and copy out every example and run it, right through the
book.

Once you have done that, think up something that you would like to code
and just start! Having trouble knowing where to start? Start with
something basic, like defining the functions that you will need, or
something like that. Don't know a bit of code? Google is your best
friend.

C isn't an extremely hard language to learn, it's just some aspects of
it are not as friendly as someothers.

Feb 4 '06 #15
On Fri, 03 Feb 2006 21:02:52 -0600, <mi*****@austarnet.com.au> wrote:

mi*********@gmail.com wrote:
Hi guys, am learning c as a beginner language and am finding it rough
especially with pointers and data files. What do you think, am i being
too pessimistic or thats how it happens for a beginner? Are there
better languages than c for a beginner? For instance visual basic or i
should just keep the confidence of improving?
My advice is, like the other people who have posted, get a good
tuitorial and copy out every example and run it, right through the
book.

Once you have done that, think up something that you would like to code
and just start! Having trouble knowing where to start? Start with
something basic, like defining the functions that you will need, or
something like that. Don't know a bit of code? Google is your best
friend.


I find that having a general overall understanding of how programming
works in this situation, as you understand what you need to do, and then
can find the correct functions, operators, etc. to do your work.
C isn't an extremely hard language to learn, it's just some aspects of
it are not as friendly as someothers.


I'd say most of it is just paying attention to the details. :-)

- Arctic

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Feb 4 '06 #16
> I find that having a general overall understanding of how programming
works in this situation, as you understand what you need to do, and then
can find the correct functions, operators, etc. to do your work.


That's basically what I ment, read, learn, understand. A little bit of
culture/history wouldn't go astray either.

Feb 5 '06 #17
August Karlstrom wrote:
Richard Bos wrote:
August Karlstrom <fu********@comhem.se> wrote:
There are definitely better languages for a beginner (and for just
about anyone) than C. Have a look at Oberon for instance. It's a
successor to Pascal and Modula, but unlike Pascal it's not limited in
any way.


Then it's not suited for beginners.


Well, you're wrong. The "unsafe" low-level features are only available
if the pseudo module SYSTEM is imported. Without SYSTEM as a client a
module is completely type safe.


Considering in C beginners often do things like cast malloc or which
are along the lines of:
void function(char *ptr) {
printf(ptr);
return;
}
I wouldn't be amazingly surprised if beginners to Oberon learnt to
import system as the first thing they did (although the C++
using namespace std; example may be closer). Not a critique of
Oberon (I've never seen it), simply that most beginners (reasonably)
want to take the simplest approach.

--
imalone
Feb 6 '06 #18
Ian Malone wrote:
August Karlstrom wrote:
Well, you're wrong. The "unsafe" low-level features are only available
if the pseudo module SYSTEM is imported. Without SYSTEM as a client a
module is completely type safe.


Considering in C beginners often do things like cast malloc or which
are along the lines of:
void function(char *ptr) {
printf(ptr);
return;
}
I wouldn't be amazingly surprised if beginners to Oberon learnt to
import system as the first thing they did (although the C++
using namespace std; example may be closer). Not a critique of
Oberon (I've never seen it), simply that most beginners (reasonably)
want to take the simplest approach.


Well, the instructor can prohibit the use of the system module in
assignments. Moreover, the low-level aspects of a language is typically
not the first thing you learn, so a beginner will probably not know
about the existence of a system module until the instructor has
introduced it.
August

--
I am the "ILOVEGNU" signature virus. Just copy me to your
signature. This email was infected under the terms of the GNU
General Public License.
Feb 6 '06 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard B. Kreckel | last post by:
Hi! I was recently asked what book to recommend for a beginner in C++. I am convinced that you needn't study C in depth before learning C++ (though it helps), but cannot find any beginner's...
24
by: silversurfer2025 | last post by:
Hello. I do not know whether this really is the right group, but I could not find any group dealing only with GUIs for C++ so here I am. I am currently deciding which GUI to use in my program....
1
by: Blue_hatter | last post by:
Hey Guys, I'm a newbie to the whole C++ Programming thing as I think I said before in a post. The thing is, I have this idea that might help me to learn at a better pace than I am doing currently....
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
6
by: Solo.Wolve | last post by:
I've just finished the K&R c, And begin to study c++ myself,so can anyone give me some advice?such as some books to read,and something to notice? Thank you very much.
4
by: a | last post by:
Dear all vb.net developer I want to know the time I need to master vb.net? I'm beginner
10
by: hamza612 | last post by:
I want to start learning how to program. But I dont know where to start. From what I've heard so far c++ is not a good lang. to learn as a beginner because its very complicated compared to others...
8
by: shweta khare | last post by:
Hello!....am a beginner in the field of computer science and programming.Am persuing my computer science engineering course and hav jst begun wid C programming language.Am using the book "Let Us C"...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.