<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ScapeCode &#187; Quizzes</title>
	<atom:link href="http://scapecode.com/category/quizzes/feed/" rel="self" type="application/rss+xml" />
	<link>http://scapecode.com</link>
	<description>Anime, tentacles, and software development.</description>
	<lastBuildDate>Thu, 26 Aug 2010 22:32:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A Simple C++ Quiz</title>
		<link>http://scapecode.com/2009/10/a-simple-c-quiz/</link>
		<comments>http://scapecode.com/2009/10/a-simple-c-quiz/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 22:16:35 +0000</pubDate>
		<dc:creator>Washu</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Quizzes]]></category>

		<guid isPermaLink="false">http://scapecode.com/?p=107</guid>
		<description><![CDATA[Recently some people have been pestering me to post back up my C++ quizzes. So…without further ado here is the first one. The answers will be posted later. Given the following three lines of code, answer these questions int* p = new int[10]; int* j = p + 11; int* k = p + 10; [...]]]></description>
			<content:encoded><![CDATA[<p>Recently some people have been pestering me to post back up my C++ quizzes. So…without further ado here is the first one. The answers will be posted later.</p>
<ol>
<li>Given the following three lines of code, answer these questions<br />
<code>int* p = new int[10];<br />
int* j = p + 11;<br />
int* k = p + 10;</code></p>
<ol>
<li>Is the second line well defined behavior?</li>
<li>If the second line is well defined, where does the pointer point to?</li>
<li>What are some of the legal operations that can be performed on the third pointer?</li>
</ol>
</li>
<li>What output should the following lines of code produce?<br />
<code>int a = 10;<br />
std::cout&lt;&lt;a&lt;&lt;a++&lt;&lt;--a;</code></li>
<li>Assuming the function called in the following block of code has no default parameters, and that no operators are overloaded, how many parameters does it take? Which objects are passed to it?<br />
<code>f((a, b, c), d, e, ((g, h), i));</code></li>
<li>Assuming the function called in the following block of code takes an A* and a B*, what is potentially wrong with the code?<br />
<code>f(new A(), new B());</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://scapecode.com/2009/10/a-simple-c-quiz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
