Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Some new C programming examples - files, structs, unions etc

A series of new "C" examples have been added to the web site - a course for a small group allowed me to go somewhat away from the more normal run yesterday and write some new illustrations in front of them.

Call by value v call by pointer comparison: link

Using extern to share a variable between two different sources: link and link

Handling command line parameters through pointers: link

Structures, and pointers to structures: link and link

Unions, where memory is shared between variables: link

File handling through open and read, fopen and fgets compared: link and link

And some C++ examples:

Fomatting floating point numbers in C++: link

Using a vector (in effect an object that's an array but can be extended as required: link

All examples have comments and sample outputs included and will open in a new window if you click on the links. All simple examples, and they're often the best!
(written 2007-12-19)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
C204 - C and C based languages - Functions, Macros and programs in multiple files
  [4557] Function prototype - what they are and why you should use them - C and C++ - (2015-10-27)
  [4555] Preprocessor directives in C and C++ - what they mean - (2015-10-27)
  [4554] Passing information into functions in C - by name, by value - (2015-10-26)
  [4338] Passing arrays into functions in C - (2014-12-02)
  [3721] Naming blocks of code, structures and Object Orientation - efficient coding in manageable chunks - (2012-05-06)
  [3717] Returning extra results from a function in C - (2012-05-03)
  [3237] Using functions to keep look and feel apart from calculations - simple C example - (2011-04-09)
  [2841] C Course exercise and sample answer - source in 2 files - (2010-06-30)
  [2575] Sharing variables between files of code in C - extern - (2010-01-14)
  [2570] Function Prototypes in C - (2010-01-11)
  [1163] A better alternative to cutting and pasting code - (2007-04-26)
  [775] Do not duplicate your code - (2006-06-23)

C207 - C and C based languages - Pointers and references
  [4560] Variables, Pointers and References - C and C++ - (2015-10-29)
  [4128] Allocating memory dynamically in a static language like C - (2013-06-30)
  [3399] From fish, loaves and apples to money, plastic cards and BACS (Perl references explained) - (2011-08-20)
  [3386] Adding the pieces together to make a complete language - C - (2011-08-11)
  [3242] How to return 2 values from a function (C++ and C) - more uses of pointers - (2011-04-10)
  [3238] Bradshaw, Ben and Bill. And some C and C++ pointers and references too. - (2011-04-09)
  [3121] New year, new C Course - (2011-01-05)
  [3004] Increment operators for counting - Perl, PHP, C and others - (2010-10-18)
  [2670] Pointers to Pointers to Pointers - what is the point? - (2010-03-10)
  [2572] The what and why of C pointers - (2010-01-13)
  [2005] Variables and pointers and references - C and C++ - (2009-01-23)
  [1497] Training Season Starts again! - (2008-01-07)
  [1155] Pointers in C - (2007-04-19)

C209 - C and C based languages - Structures and Unions
  [3145] Structures v Structure Pointers in C. How, which, why. - (2011-01-25)
  [3122] When is a program complete? - (2011-01-06)
  [2573] C Structs - what, how and why - (2010-01-13)
  [1669] What are Unions (C programming) - (2008-06-08)
  [1584] Using Structs and Unions together effectively in C - (2008-03-21)
  [1572] C - structs and unions, C++ classes and polymorphism - (2008-03-13)

C235 - C and C based languages - I/O in C++
  [4563] Formatting and outputting your own classes in C++ - (2015-10-30)
  [4562] Left shift operator on an output stream object - C++ - (2015-10-30)
  [3810] Reading files, and using factories to create vectors of objects from the data in C++ - (2012-07-21)
  [3807] Reading (and writing) files in C++ - (2012-07-18)
  [3390] Printing objects in C++ - (2011-08-13)
  [3252] C++ - unknown array size, unknown object type. Help! - (2011-04-17)
  [3124] C++ - putting the language elements together into a program - (2011-01-08)
  [1675] Comparing Objects in C++ - (2008-06-13)

C238 - C and C based languages - Templates
  [3982] Using a vector within an object - C++ - (2013-01-19)
  [3509] Operator Overloading, Exceptions, Pointers, References and Templates in C++ - new examples from our courses - (2011-11-06)
  [3388] Templates in C++ - defining a family pattern of methods / functions - (2011-08-12)
  [3245] Collections in C and C++ - arrays, vectors and heap memory blocks - (2011-04-12)


Back to
Decisions - small ones, or big ones?
Previous and next
or
Horse's mouth home
Forward to
FSB leaves its members feeling like mushrooms
Some other Articles
A story about benchmarking PHP
The Christmas Letter
Next course - 7th January 2008, Regular Expressions
FSB leaves its members feeling like mushrooms
Some new C programming examples - files, structs, unions etc
Decisions - small ones, or big ones?
Shopping for Christmas and looking forward
Tcl/Tk - updating your display while tasks are running
Using Tcl/Tk resource files for flexible applications
Making a variable dynamically visible in a Tcl/Tk GUI
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1478_Som ... s-etc.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat