<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>C/C++ Examples and Source Codes</title>
	<atom:link href="http://c-examples.com/feed" rel="self" type="application/rss+xml" />
	<link>http://c-examples.com</link>
	<description></description>
	<pubDate>Mon, 27 Jul 2009 23:11:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tutorial on Pointers and Arrays in C (pdf)</title>
		<link>http://c-examples.com/tutorial-on-pointers-and-arrays-in-c-pdf-999.html</link>
		<comments>http://c-examples.com/tutorial-on-pointers-and-arrays-in-c-pdf-999.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 23:11:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C Books]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=999</guid>
		<description><![CDATA[This document is intended to introduce pointers to beginning programmers in the C programming language. Over several years of reading and contributing to various conferences on C including those on the FidoNet and UseNet, I have noted a large number of newcomers to C appear to have a difficult time in grasping the fundamentals of [...]]]></description>
			<content:encoded><![CDATA[<p>This document is intended to introduce pointers to beginning programmers in the C programming language. <span id="more-999"></span>Over several years of reading and contributing to various conferences on C including those on the FidoNet and UseNet, I have noted a large number of newcomers to C appear to have a difficult time in grasping the fundamentals of pointers. I therefore undertook the task of trying to explain them in plain language with lots of examples. <br />
<a href="http://home.earthlink.net/~momotuk/pointers.pdf">DOWNLOAD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/tutorial-on-pointers-and-arrays-in-c-pdf-999.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linked List Example in C</title>
		<link>http://c-examples.com/linked-list-example-in-c-991.html</link>
		<comments>http://c-examples.com/linked-list-example-in-c-991.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 22:57:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linked List]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=991</guid>
		<description><![CDATA[Each record of a linked list is often called an element or node. The field of each node that contains address of the next node is usually called the next link or next pointer. The remaining fields may be called the data, information, value, or payload fields.
The head of a list is its first node, [...]]]></description>
			<content:encoded><![CDATA[<p>Each record of a linked list is often called an element or node. The field of each node that contains address of the next node is usually called the next link or next pointer.<span id="more-991"></span> The remaining fields may be called the data, information, value, or payload fields.</p>
<p>The head of a list is its first node, and the tail is the list minus that node (or a pointer thereto). In Lisp and some derived languages, the tail may be called the CDR (pronounced could-R) of the list, while the payload of the head node may be called the CAR.<br />
Many programming languages such as Lisp and Scheme have singly linked lists built in. In many functional languages, these lists are constructed from nodes, each called a cons or cons cell. The cons has two fields: the car, a reference to the data for that node, and the cdr, a reference to the next node. Although cons cells can be used to build other data structures, this is their primary purpose.<br />
In languages that support Abstract data types or templates, linked list ADTs or templates are available for building linked lists. In other languages, linked lists are typically built using references together with records. Here is a complete example in C:</p>
<blockquote><p>
#include     /* for printf */<br />
#include    /* for malloc */</p>
<p>typedef struct node {<br />
int data;<br />
struct node *next; /* pointer to next element in list */<br />
} LLIST;</p>
<p>LLIST *list_add(LLIST **p, int i);<br />
void list_remove(LLIST **p);<br />
LLIST **list_search(LLIST **n, int i);<br />
void list_print(LLIST *n);</p>
<p>LLIST *list_add(LLIST **p, int i)<br />
{<br />
LLIST *n = (LLIST *) malloc(sizeof(LLIST));<br />
if (n == NULL)<br />
return NULL;</p>
<p>n-&gt;next = *p; /* the previous element (*p) now becomes the &#8220;next&#8221; element */<br />
*p = n;       /* add new empty element to the front (head) of the list */<br />
n-&gt;data = i;</p>
<p>return *p;<br />
}</p>
<p>void list_remove(LLIST **p) /* remove head */<br />
{<br />
if (*p != NULL)<br />
{<br />
LLIST *n = *p;<br />
*p = (*p)-&gt;next;<br />
free(n);<br />
}<br />
}</p>
<p>LLIST **list_search(LLIST **n, int i)<br />
{<br />
while (*n != NULL)<br />
{<br />
if ((*n)-&gt;data == i)<br />
{<br />
return n;<br />
}<br />
n = &amp;(*n)-&gt;next;<br />
}<br />
return NULL;<br />
}</p>
<p>void list_print(LLIST *n)<br />
{<br />
if (n == NULL)<br />
{<br />
printf(&#8221;list is empty\n&#8221;);<br />
}<br />
while (n != NULL)<br />
{<br />
printf(&#8221;print %p %p %d\n&#8221;, n, n-&gt;next, n-&gt;data);<br />
n = n-&gt;next;<br />
}<br />
}</p>
<p>int main(void)<br />
{<br />
LLIST *n = NULL;</p>
<p>list_add(&amp;n, 0); /* list: 0 */<br />
list_add(&amp;n, 1); /* list: 1 0 */<br />
list_add(&amp;n, 2); /* list: 2 1 0 */<br />
list_add(&amp;n, 3); /* list: 3 2 1 0 */<br />
list_add(&amp;n, 4); /* list: 4 3 2 1 0 */<br />
list_print(n);<br />
list_remove(&amp;n);                 /* remove first (4) */<br />
list_remove(&amp;n-&gt;next);           /* remove new second (2) */<br />
list_remove(list_search(&amp;n, 1)); /* remove cell containing 1 (first) */<br />
list_remove(&amp;n-&gt;next);           /* remove second to last node (0) */<br />
list_remove(&amp;n);                 /* remove last (3) */<br />
list_print(n);</p>
<p>return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/linked-list-example-in-c-991.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Use Basic C++, Syntax and Operators(pdf)</title>
		<link>http://c-examples.com/use-basic-c-syntax-and-operatorspdf-989.html</link>
		<comments>http://c-examples.com/use-basic-c-syntax-and-operatorspdf-989.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 22:40:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C Books]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=989</guid>
		<description><![CDATA[In this How to we summarize the basic syntax of C++ and the rules and operators that are used in C++ expressions. This is a brief language reference for C++ as used in this book, not the entire language. We don’t cover the use of dynamic memory in this How to.
DOWNLOAD
]]></description>
			<content:encoded><![CDATA[<p>In this How to we summarize the basic syntax of C++ and the rules and operators that are used in C++ expressions. This is a brief language reference for C++ as used in this book, not the entire language. We don’t cover the use of dynamic memory in this How to.<span id="more-989"></span></p>
<p><a href="http://www.cs.duke.edu/csed/tapestry/howtoa.pdf">DOWNLOAD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/use-basic-c-syntax-and-operatorspdf-989.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C Array Fun</title>
		<link>http://c-examples.com/c-array-fun-980.html</link>
		<comments>http://c-examples.com/c-array-fun-980.html#comments</comments>
		<pubDate>Fri, 08 May 2009 17:45:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=980</guid>
		<description><![CDATA[Array Fun allows you to do the following operations on an array: Read file; print array; print stats (average, range, mode, median); add to the file (multiple nums); delete from file (one num); sorting (bubble sort / replacement sort / insertion sort / quick sort); find a number using binary search.
Download
]]></description>
			<content:encoded><![CDATA[<p>Array Fun allows you to do the following operations on an array: Read file; print array; print stats (average, range, mode, median); add to the file (multiple nums); delete from file (one num); sorting (bubble sort / replacement sort / insertion sort / quick sort); find a number using binary search.<span id="more-980"></span></p>
<p><a href="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2871&amp;lngWId=3">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/c-array-fun-980.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sort C Array Using Recursion</title>
		<link>http://c-examples.com/sort-c-array-using-recursion-977.html</link>
		<comments>http://c-examples.com/sort-c-array-using-recursion-977.html#comments</comments>
		<pubDate>Fri, 08 May 2009 17:41:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=977</guid>
		<description><![CDATA[This code sorts an array using recursion.
Download
]]></description>
			<content:encoded><![CDATA[<p>This code sorts an array using recursion.<span id="more-977"></span></p>
<p><a href="http://www.dreamincode.net/code/snippet525.htm">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/sort-c-array-using-recursion-977.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>String C Array Length</title>
		<link>http://c-examples.com/string-c-array-length-974.html</link>
		<comments>http://c-examples.com/string-c-array-length-974.html#comments</comments>
		<pubDate>Fri, 08 May 2009 17:38:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=974</guid>
		<description><![CDATA[This pretty simple, where message and message2 are in the main function you can enter a c string and the function StringLength will tell you how many characters are in the string.  You can create many varitions with this snippet.
Download
]]></description>
			<content:encoded><![CDATA[<p>This pretty simple, where message and message2 are in the main function you can enter a <a href="http://c-examples.com">c string </a>and the function StringLength will tell you how many characters are in the string.<span id="more-974"></span>  You can create many varitions with this snippet.</p>
<p><a href="http://www.dreamincode.net/code/snippet432.htm">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/string-c-array-length-974.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Recording using C pointers</title>
		<link>http://c-examples.com/recording-using-c-pointers-968.html</link>
		<comments>http://c-examples.com/recording-using-c-pointers-968.html#comments</comments>
		<pubDate>Fri, 08 May 2009 17:33:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=968</guid>
		<description><![CDATA[Records a number using a pointer.
Download
]]></description>
			<content:encoded><![CDATA[<p>Records a number using a pointer.<span id="more-968"></span></p>
<p><a href="http://www.dreamincode.net/code/snippet558.htm">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/recording-using-c-pointers-968.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C++ Pointer Example</title>
		<link>http://c-examples.com/c-pointer-example-966.html</link>
		<comments>http://c-examples.com/c-pointer-example-966.html#comments</comments>
		<pubDate>Fri, 08 May 2009 17:31:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://c-examples.com/?p=966</guid>
		<description><![CDATA[This code shows how to use pointers in a c simple example that adds people to the text file , deletes them or retrieves them.
Download
]]></description>
			<content:encoded><![CDATA[<p>This code shows how to use pointers in a c simple example that adds people to the text file , deletes them or retrieves them.<span id="more-966"></span></p>
<p><a href="http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=3&amp;lngCodeId=4505&amp;strZipAccessCode=tp%2FA45055158">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/c-pointer-example-966.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Master C String Download</title>
		<link>http://c-examples.com/master-c-string-download-723.html</link>
		<comments>http://c-examples.com/master-c-string-download-723.html#comments</comments>
		<pubDate>Sat, 02 May 2009 02:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[File Management]]></category>

		<guid isPermaLink="false">http://c-examples.com/master-string-download.html</guid>
		<description><![CDATA[Master String is a collection of functions, and classes that will aid you in very explicit string manipulation.

 Download from: Homepage
]]></description>
			<content:encoded><![CDATA[<p><!--nojustify-->Master String is a collection of functions, and classes that will aid you in very explicit string manipulation.</p>
<p><span id="more-723"></span></p>
<p><img src="/images/mir_download.gif" alt="" align="middle" /> Download from: <a id="dwlinks" onmouseover="status=''; return true;" onmouseout="status=''" rel="nofollow" href="http://www.cplusplus.com/src/MasterString.zip">Homepage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/master-c-string-download-723.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C Array Sorting Download</title>
		<link>http://c-examples.com/c-array-sorting-download-703.html</link>
		<comments>http://c-examples.com/c-array-sorting-download-703.html#comments</comments>
		<pubDate>Wed, 22 Apr 2009 02:54:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Sample Codes]]></category>

		<guid isPermaLink="false">http://c-examples.com/array-sorting-download-703.html</guid>
		<description><![CDATA[
This package contains a sort header file with&#160;four types of sorts: bubble, insertion, quick and selection. The header also uses templates so that you can implement the sorle, insertion, quick and selection. The header also uses templates so that you can implement the sorting of several types. 

 Download from: Homepage
]]></description>
			<content:encoded><![CDATA[<p><!--nojustify-->
<p>This package contains a sort header file with&nbsp;four types of sorts: bubble, insertion, quick and selection. The header also uses templates so that you can implement the sor<span id="more-703"></span>le, insertion, quick and selection. The header also uses templates so that you can implement the sorting of several types. </p>
</div>
<p><img align="middle" src="/images/mir_download.gif" /> Download from: <a onmouseover="status=''; return true;" onmouseout="status=''" href="http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=3&amp;lngCodeId=2948&amp;strZipAccessCode=tp%2FA29480112" id="dwlinks" rel="nofollow">Homepage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://c-examples.com/c-array-sorting-download-703.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
