<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mohammed Salah's Blog</title>
	<atom:link href="http://mohammedsalah.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mohammedsalah.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sun, 26 Apr 2009 10:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mohammedsalah.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mohammed Salah's Blog</title>
		<link>http://mohammedsalah.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mohammedsalah.wordpress.com/osd.xml" title="Mohammed Salah&#039;s Blog" />
	<atom:link rel='hub' href='http://mohammedsalah.wordpress.com/?pushpress=hub'/>
		<item>
		<title>strlen() vs. sizeof() tip</title>
		<link>http://mohammedsalah.wordpress.com/2009/04/26/strlen-vs-sizeof-tip/</link>
		<comments>http://mohammedsalah.wordpress.com/2009/04/26/strlen-vs-sizeof-tip/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 10:35:35 +0000</pubDate>
		<dc:creator>Mohammed Salah</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mohammedsalah.wordpress.com/2009/04/26/strlen-vs-sizeof-tip/</guid>
		<description><![CDATA[Only use sizeof() for locally allocated buffers. Always use strlen() for variables passed from outside. Why: using sizeof() with a pointer to char passed to you will return the size of the pointer itself (which is 4 always) not the size of the allocated space to that buffer.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=27&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Only use sizeof() for locally allocated buffers.<br /> Always use strlen() for variables passed from outside.</p>
<p> <b>Why</b>: using sizeof() with a pointer to char passed to you will return<br /> the size of the pointer itself (which is 4 always) not the size of the<br /> allocated space to that buffer.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=108827a2-8299-887c-b509-f2a0849dc525" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mohammedsalah.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mohammedsalah.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mohammedsalah.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=27&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mohammedsalah.wordpress.com/2009/04/26/strlen-vs-sizeof-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aefff1085faf79088976ec3b19761bce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msalah</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=108827a2-8299-887c-b509-f2a0849dc525" medium="image" />
	</item>
		<item>
		<title>Careful when using strncpy</title>
		<link>http://mohammedsalah.wordpress.com/2009/04/26/careful-when-using-strncpy/</link>
		<comments>http://mohammedsalah.wordpress.com/2009/04/26/careful-when-using-strncpy/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 10:11:41 +0000</pubDate>
		<dc:creator>Mohammed Salah</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://mohammedsalah.wordpress.com/?p=24</guid>
		<description><![CDATA[Copy characters from string Copies the first num characters of source to destination. If the end of the source C string (which is signaled by a null-character) is found before num characters have been copied, destination is padded with zeros until a total of num characters have been written to it. No null-character is implicitly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=24&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Copy characters from string</strong></p>
<p>Copies the first num characters of source to destination. If the end of the source C string (which is signaled by a null-character) is found before num characters have been copied, destination is padded with zeros until a total of num characters have been written to it.</p>
<p>No null-character is implicitly appended to the end of destination, so destination will only be null-terminated if the length of the C string in source is less than num.<br />
<strong>Parameters</strong></p>
<p>destination<br />
Pointer to the destination array where the content is to be copied.<br />
source<br />
C string to be copied.<br />
num<br />
Maximum number of characters to be copied from source.</p>
<p><strong>Return Value</strong><br />
destination is returned.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mohammedsalah.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mohammedsalah.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mohammedsalah.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=24&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mohammedsalah.wordpress.com/2009/04/26/careful-when-using-strncpy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aefff1085faf79088976ec3b19761bce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msalah</media:title>
		</media:content>
	</item>
		<item>
		<title>C/C++ const trick</title>
		<link>http://mohammedsalah.wordpress.com/2009/04/23/const-trick/</link>
		<comments>http://mohammedsalah.wordpress.com/2009/04/23/const-trick/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 15:05:09 +0000</pubDate>
		<dc:creator>Mohammed Salah</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://mohammedsalah.wordpress.com/?p=3</guid>
		<description><![CDATA[int x = 7; Now, what is the difference between each one of the next statements? int *p = &#38;x; // “p” is a modifiable pointer to a modifiable int const int *p = &#38;x; // “p” is a modifiable pointer to a read only int int const *p = &#38;x; // “p” is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=3&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entry">
<div class="snap_preview">
<div class="entry">
<div class="snap_preview">
<p>int x = 7;</p>
<p>Now, what is the difference between each one of the next statements?</p>
<p>int *p = &amp;x; // “p” is a modifiable pointer to a modifiable int</p>
<p>const int *p = &amp;x; // “p” is a modifiable pointer to a read only int</p>
<p>int const *p = &amp;x; // “p” is a read-only pointer to a modifiable int</p>
<p>const int const *p = &amp;x; // “p” is a read-only pointer to a read-only int</p></div>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mohammedsalah.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mohammedsalah.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mohammedsalah.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mohammedsalah.wordpress.com&amp;blog=7475567&amp;post=3&amp;subd=mohammedsalah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mohammedsalah.wordpress.com/2009/04/23/const-trick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aefff1085faf79088976ec3b19761bce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msalah</media:title>
		</media:content>
	</item>
	</channel>
</rss>
