<?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%3Alab-2%3Ahals016</id>
	<title>SE250:lab-2:hals016 - 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%3Alab-2%3Ahals016"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-2:hals016&amp;action=history"/>
	<updated>2026-04-27T15:24:24Z</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:lab-2:hals016&amp;diff=4854&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:lab-2:hals016&amp;diff=4854&amp;oldid=prev"/>
		<updated>2008-11-03T05:18:57Z</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;===Task 1===&lt;br /&gt;
&lt;br /&gt;
The output for Task 1 was the same (size of pointer) regardless of the different types (short,double,float,integer,long).&lt;br /&gt;
&lt;br /&gt;
Lab machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip = 4&lt;br /&gt;
ip2 = 4&lt;br /&gt;
ip3 = 4&lt;br /&gt;
ip4 = 4&lt;br /&gt;
ip5 = 4&lt;br /&gt;
ip6 = 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Even more surprising is that the Linux Server has exactly the same values as the lab machine&lt;br /&gt;
Linux server&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip = 4&lt;br /&gt;
ip2 = 4&lt;br /&gt;
ip3 = 4&lt;br /&gt;
ip4 = 4&lt;br /&gt;
ip5 = 4&lt;br /&gt;
ip6 = 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I conclude that I do not know what is going on, or why.&lt;br /&gt;
&lt;br /&gt;
===Task 2 + 3===&lt;br /&gt;
&lt;br /&gt;
In Task 2 the output varied without an obvious logical pattern.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(long)(&amp;amp;x) - (long)(&amp;amp;y)&amp;quot; resulted in 2 memory addresses that are quite close to each other.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
longx longy&lt;br /&gt;
&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccc0, diff = 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(long)(&amp;amp;x - &amp;amp;y)&amp;quot; produced numbers that are quite puzzling.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
long(x-y)&lt;br /&gt;
*char0*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 2&lt;br /&gt;
*char1*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 2&lt;br /&gt;
*char2*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 2&lt;br /&gt;
*char3*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
*char4*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 2&lt;br /&gt;
*char5*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
*char6*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
*char7*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
*char8*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccb4, diff = 4&lt;br /&gt;
*char9*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
*char10*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Over to the linux server the output was a lot different with all the differences being the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
long(x-y)&lt;br /&gt;
*char0*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 1&lt;br /&gt;
*char1*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 1&lt;br /&gt;
*char2*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 1&lt;br /&gt;
*char3*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
*char4*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccbc, diff = 1&lt;br /&gt;
*char5*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
*char6*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
*char7*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
*char8*&amp;amp;x = 0x22ccc4, &amp;amp;y = 0x22ccb4, diff = 1&lt;br /&gt;
*char9*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
*char10*&amp;amp;x = 0x22ccbc, &amp;amp;y = 0x22cc9c, diff = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Lab2 I was presented with many errors but mostly minor ones. Some of them which the lecturer said was ok as we are only experimenting.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>