473,889 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A C tutorial

There is a C tutorial at
http://www.cs.virginia.edu/~lcc-win32
It is written to go with the compiler, available
at the same URL.

I have added quite a bit of material, and I would be
glad if people in this group give it a try and tell me if
I am saying nonsense somewhere.

Beware that I am not very orthodox, hence my tutorial
(and the associated compiler) is not just a tutorial about
ANSI C, but covers things like operator overloading and
other heresies :-)

And since it is running in a specific OS, windows
programming makes for quite a lot of pages. If you
use another OS however, the first part is (almost)
straight C.

jacob

Nov 14 '05
156 7754
nrk
Joona I Palaste wrote:
Dan Pop <Da*****@cern.c h> scribbled the following:
The 1 to 1 correspondence between what you see on the screen and what you
get printed is a big bonus when selectively printing parts of the
document, which is what I often do. And high resolution screens are
commonly available these days (1050x1400 for laptops, 1200x1600 for
desktops) for people who want to enjoy the quality of a good PDF
renderer.

Last but not least, having the complete document, which can be a thick
book, in a single file of reasonable size is extremely convenient.

I don't like PDF for documents where plain text would do equally well,
like most of the C standard. But once multiple fonts are a *real* need,
as well as pictures and complex diagrams, not to mention *proper* support
for languages other than English and whatever can fit into Latin-1, I
have yet to see something better than PDF.


I agree with you, and may I add that one other reason for preferring
PDFs is that they're easy to generate from PostScript documents, which
can be made to include mathematical symbols not found in pretty much
any ISO-8859-x character set, by using LaTeX. I have found this a very
good thing when writing homework solutions in mathematics.


The LaTeX->dvi->ps->pdf is the correct way to generate butt-ugly PDF files.
They print fine, but viewing them on screen is torture and you can't copy
and paste normally. You should try pdflatex sometime.

-nrk.

--
Remove devnull for email
Nov 14 '05 #141
On Sun, 15 Feb 2004 20:33:43 GMT, in comp.lang.c , Randy Howard
<ra*********@FO OverizonBAR.net > wrote:
In article <t5************ *************** *****@4ax.com>,
ma**********@s pamcop.net says...
>> Golly, prove that you can convert uppercase characters in a stream of data
>> into lowercase ones using only standard C? oooo thats tricky....
>
>Learn To Read. Then Turn To Page 24 Of K&R2, And Read Exercise 1-13.
Learn to Understand. In my copy of K&R, page 24 begins:
"caller, as does "falling off the end" of a fucntion by reaching the
terminating right brace.
Exercise 1-13. Write a program to convert..."


Clearly, you made a mistake the first time, and used K&R1, even though
you yourself mentioned K&R2 previously.


Indeed - I was looking in K&R, which is the one on my shelf at home. K&R2 s
in the office.
I'm not disagreeing with your arguments btw, I just don't see any
reason to try and cover up such a simple mistake.


I didn't realise till later in the thread that the examples were different,
and by then I'd decided that Richard was annoying me enough for me to use
the error to further obfuscate the "debate" if one can dignify if with such
a word.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #142
Randy Howard wrote:
In article <c0**********@h ercules.btinter net.com>,
do******@addres s.co.uk.invalid says...
> You asked me to solve K&R2 1.13. Now in my copy thats
> "write a program to convert its input to lower case, using a function
> lower(c) which returns c if c is not a letter, and the lower case value
> of c if it is a letter"


Then get a book that has the same 1.13 as everyone else's 1.13.


It's clear that he's using K&R1, despite writing K&R2 above.


That seems like a plausible explanation. I was beginning to wonder!

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #143
In <c0**********@t itan.btinternet .com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:
BTW, I chanllenge you to write a fully functional text reader
(e.g. having the basic features of the open source "less") using only
that subset of the language.


I have not claimed that I can do this (in fact, the absence of full screen
video in standard C makes it impossible to do portably, as any newbie ought
to know). But 1-13 is a different matter.


Remove any "less" features having anything to do with full screen support
and my challenge still stands. Simply assume a 25-line console with
scroll support when needing to display a new page of text.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #144
In <c0**********@s parta.btinterne t.com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:
Your examples implied that the base character set of the implementation
is good enough for any text-based utility.
It's sufficient for clear communication to occur, yes.


Not even in English, if complex mathematical formulas and foreign names
have to be properly included, much less in most other languages.
And obviously not if the clear communication would require pictures,
complex diagrams and screen shots.
It would be different if the target medium were paper (e.g. for a book, a
magazine article, or whatever); in those circumstances, it's appropriate to
use, say, PostScript or even PDF, or basically whatever the publishers want
- after all, they're the ones that have to print it. But when publishing
material on the Net, I see no reason arbitrarily to restrict one's audience
by choosing esoteric file formats.


A file format with open specification and open source readers hardly
qualifies as an esoteric file format.

If you don't like PDF, that's fine with me, but there is no point in
publicly complaining about it.

What I don't like are the horribly formatted documents (especially the
ones requiring horizontal scrolling), but it would be downright idiotic
to blame PDF on that.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #145
In <c0**********@s parta.btinterne t.com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:

<snip>
>King of the hypocrites? No, not really. You see, I don't distrust GNU.
>But I /do/ distrust Adobe. I am confident of GNU's good intentions. I am
>not confident of Adobe's good intentions.

Non sequitur and a proof that you have understood nothing of this issue.

I think we're talking about different issues. Feel free to continue
discussing the one that concerns you, if you must.


I was talking about the one you claimed it concerned you: malicious code
in your utilities. It seems that, after all, it was a false concern...


I was talking about not trusting Adobe.


You were talking about not trusting tools whose source code is not
publicly available, because they could contain malicious code. And I
was pointing out that, if this is really your concern, open source tools
are no safer from this point of view, unless you're compiling them
yourself, with your hand made compiler.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #146
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
I think we're talking about different issues. Feel free to continue
discussin g the one that concerns you, if you must.

I was talking about the one you claimed it concerned you: malicious code
in your utilities. It seems that, after all, it was a false concern...


I was talking about not trusting Adobe.


You were talking about not trusting tools whose source code is not
publicly available, because they could contain malicious code.


I was talking about not trusting Adobe's tools whose source code is not
publicly available. I don't trust Adobe. Simple as that.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #147
Dan Pop wrote:
In <c0**********@t itan.btinternet .com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:
BTW, I chanllenge you to write a fully functional text reader
(e.g. having the basic features of the open source "less") using only
that subset of the language.


I have not claimed that I can do this (in fact, the absence of full screen
video in standard C makes it impossible to do portably, as any newbie
ought to know). But 1-13 is a different matter.


Remove any "less" features having anything to do with full screen support
and my challenge still stands. Simply assume a 25-line console with
scroll support when needing to display a new page of text.


There is no good answer to this challenge. The addition of interactivity
makes FILE * a necessity if the thing is to be done portably and
efficiently, and FILE * isn't introduced in the early part of K&R2. (Note
that my challenge to Mark McIntyre did not include an interactivity
requirement.)

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #148
Richard Heathfield wrote:
Dan Pop wrote:

.... snip ...

You were talking about not trusting tools whose source code is not
publicly available, because they could contain malicious code.


I was talking about not trusting Adobe's tools whose source code is
not publicly available. I don't trust Adobe. Simple as that.


You must have some concrete reasons. Are they shareable?

--
Chuck F (cb********@yah oo.com) (cb********@wor ldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net> USE worldnet address!
Nov 14 '05 #149
In <40******@news2 .power.net.uk> Richard Heathfield <in*****@addres s.co.uk.invalid > writes:
Dan Pop wrote:
In <c0**********@t itan.btinternet .com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:

BTW, I chanllenge you to write a fully functional text reader
(e.g. having the basic features of the open source "less") using only
that subset of the language.

I have not claimed that I can do this (in fact, the absence of full screen
video in standard C makes it impossible to do portably, as any newbie
ought to know). But 1-13 is a different matter.


Remove any "less" features having anything to do with full screen support
and my challenge still stands. Simply assume a 25-line console with
scroll support when needing to display a new page of text.


There is no good answer to this challenge. The addition of interactivity
makes FILE * a necessity if the thing is to be done portably and
efficiently, and FILE * isn't introduced in the early part of K&R2. (Note
that my challenge to Mark McIntyre did not include an interactivity
requirement. )


How can I read a 10+ page document with a non-interactive file reader?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #150

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

Similar topics

1
2936
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT tutorial..... -- Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to make it
15
4246
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is avaliable at... http://www.geocities.com/binnyva/code/javascript/advanced_tutorial/ If any of you could spare the time, please have a look at my tutorial
18
1970
by: Xah Lee | last post by:
i've started to read python tutorial recently. http://python.org/doc/2.3.4/tut/tut.html Here are some quick critique: quick example: If the input string is too long, they don't truncate it, but return it unchanged; this will mess up your column lay-out but that's usually better than the alternative, which would be lying about a value. (If you really want truncation you can always add a slice operation, as in
0
1789
by: Joe Mayo | last post by:
I've recently updated the C# Tutorial at C# Station with a new addition, Lesson 17: Enums. The C# Tutorial may be found at http://www.csharp-station.com/Tutorial.aspx. Other updates include: 1. Downloadable source code. 2. All example programs run on-line as NTD apps. 3. A support forum for discussing the Tutorial.
10
3098
by: Safalra | last post by:
When a poster in a forum I frequent said they were beginning to learn HTML, I thought I should direct them to a good HTML tutorial so that they wouldn't start using <blink> and the like. Remembering that this group has discussed HTML tutorials several times in the past, I searched the Google Groups archives, but all I can find are tutorials unfortunately demonstrating Flavell's Law. Searching the internet, the only accurate tutorials for...
11
2945
by: Magnus Lycka | last post by:
While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on the web. I think 'A Byte of Python' by Swaroop C H is a good beginners tutorial, and 'Dive Into Python' by Mark Pilgrim is a good tutorial for more experienced programmers.
7
2262
by: Turbo | last post by:
I have a written a detailed html tutorial here:- http://sandy007smarty.seo.iitm.ac.in/2006/09/26/html-tutorial/ I know there are a couple of html tutorials out there. But its a tutorial without links!! Everything in one page. Please leave a comment if you like it.
2
2114
by: sara | last post by:
Hi All, I learned C++ long time ago and now I want to review all of its details in a short time like a week. I wonder if there is a good tutorial you know which I can read for this purpose. Thanks a lot.
0
9969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9810
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7999
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4650
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3257
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.