<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3AHTTB%3APointers%3AUses_of_pointers</id>
	<title>SE250:HTTB:Pointers:Uses of pointers - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3AHTTB%3APointers%3AUses_of_pointers"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:HTTB:Pointers:Uses_of_pointers&amp;action=history"/>
	<updated>2026-04-24T03:41:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:HTTB:Pointers:Uses_of_pointers&amp;diff=2048&amp;oldid=prev</id>
		<title>Mark: 3 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:HTTB:Pointers:Uses_of_pointers&amp;diff=2048&amp;oldid=prev"/>
		<updated>2008-11-03T05:09:51Z</updated>

		<summary type="html">&lt;p&gt;3 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td bgcolor=&amp;quot;#552200&amp;quot; width=&amp;quot;1000&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;image src=&amp;quot;http://www.rajithaonline.com/SE250/httb/pointers/final/uses_head.png&amp;quot; width=&amp;quot;353&amp;quot; height=&amp;quot;92&amp;quot; alt=&amp;quot;Uses Header Logo&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SE250:HTTB:NAV&lt;br /&gt;
|prev=SE250:HTTB:Pointers:Function_pointers&lt;br /&gt;
|next=SE250:HTTB:Pointers:Common_pointer_mistakes}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pointer use in other topics ===&lt;br /&gt;
==== Linked Lists ====&lt;br /&gt;
A linked list structure is made of data cells ordered and linked by pointers.&lt;br /&gt;
Example: Definition for data cell&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
     int data; &lt;br /&gt;
     struct node *next;&lt;br /&gt;
} cell;&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
Every instance of a data cell contains a pointer which can point to the next data cell in the list.&lt;br /&gt;
&lt;br /&gt;
For more details read [[SE250:HTTB:WIP:Linked_Lists|Linked Lists]]&lt;br /&gt;
&lt;br /&gt;
==== Array-based Lists ====&lt;br /&gt;
An array-based list structure consists of a defined &amp;quot;node&amp;quot; pointing to the start of an array.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
  int *start;     &lt;br /&gt;
  int capacity;&lt;br /&gt;
  int length;&lt;br /&gt;
} Arraylist&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
The data in the array can be modified by applying [[SE250:HTTB:WIP:Pointers#Pointer_Arithmetic|Pointer Arithmetic]] on the *start pointer.&lt;br /&gt;
&lt;br /&gt;
For more details read [[SE250:HTTB:WIP:Array-based_Lists|Array-based Lists]]&lt;br /&gt;
&lt;br /&gt;
==== Binary Search Trees ====&lt;br /&gt;
A binary search tree consists of &amp;quot;nodes&amp;quot;, with each node having pointers to neighbouring nodes.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
typedef&lt;br /&gt;
struct Node {&lt;br /&gt;
  int data;&lt;br /&gt;
  struct Node *left;&lt;br /&gt;
  struct Node *right;&lt;br /&gt;
  struct Node *parent;	&lt;br /&gt;
} Node;&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
Each node will store data as well as point to other adjacent nodes. This is similar to the data cells of a linked list.&lt;br /&gt;
&lt;br /&gt;
For more details read [[SE250:HTTB:WIP:Binary_Search_Trees|Binary_Search_Trees]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{SE250:HTTB:NAV&lt;br /&gt;
|prev=SE250:HTTB:Pointers:Function_pointers&lt;br /&gt;
|next=SE250:HTTB:Pointers:Common_pointer_mistakes}}&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>