<?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>hackintoshrao</title>
	<atom:link href="http://hackintoshrao.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackintoshrao.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Mon, 20 Feb 2012 08:02:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hackintoshrao.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>hackintoshrao</title>
		<link>http://hackintoshrao.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hackintoshrao.wordpress.com/osd.xml" title="hackintoshrao" />
	<atom:link rel='hub' href='http://hackintoshrao.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Program to print the size,i-node number and Owner Id in Gnu/Linux</title>
		<link>http://hackintoshrao.wordpress.com/2012/02/20/program-to-print-the-sizei-node-number-and-owner-id-in-gnulinux/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/02/20/program-to-print-the-sizei-node-number-and-owner-id-in-gnulinux/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 08:01:59 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/02/20/program-to-print-the-sizei-node-number-and-owner-id-in-gnulinux/</guid>
		<description><![CDATA[#include&#60;stdio.h&#62;#include&#60;stdlib.h&#62;#include&#60;sys/types.h&#62;#include&#60;sys/stat.h&#62;#include&#60;unistd.h&#62;#include&#60;pwd.h&#62;int main(){     struct stat *info;     int i;    char *path;    path=(char *)malloc(200);    printf(&#8220;\nEnter the path of the file whose information is to be found: &#8220;);    scanf(&#8220;%s&#8221;,path);    i=stat(path,info);     if(i==-1)    {        printf(&#8220;\nstat failed\n\n\n\n&#8221;);        exit(0);    }     printf(&#8220;\nSize of the file:%d Bytes&#8221;,info-&#62;st_size);    printf(&#8220;\nOwner Id of the file:%d &#8220;,info-&#62;st_uid);    printf(&#8220;\nGroup Id of the file owner:%d &#8220;,info-&#62;st_gid);     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=493&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />#include&lt;stdlib.h&gt;<br />#include&lt;sys/types.h&gt;<br />#include&lt;sys/stat.h&gt;<br />#include&lt;unistd.h&gt;<br />#include&lt;pwd.h&gt;<br />int main()<br />{</p>
<p>    struct stat *info;</p>
<p>    int i;<br />    char *path;<br />    path=(char *)malloc(200);<br />    printf(&#8220;\nEnter the path of the file whose information is to be found: &#8220;);<br />    scanf(&#8220;%s&#8221;,path);<br />    i=stat(path,info);</p>
<p>    if(i==-1)<br />    {<br />        printf(&#8220;\nstat failed\n\n\n\n&#8221;);<br />        exit(0);<br />    }</p>
<p>    printf(&#8220;\nSize of the file:%d Bytes&#8221;,info-&gt;st_size);<br />    printf(&#8220;\nOwner Id of the file:%d &#8220;,info-&gt;st_uid);<br />    printf(&#8220;\nGroup Id of the file owner:%d &#8220;,info-&gt;st_gid);</p>
<p>    printf(&#8220;\nInode NO:%d\n\n\n\n &#8220;,info-&gt;st_ino);<br />    return 0;<br />}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/493/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=493&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/02/20/program-to-print-the-sizei-node-number-and-owner-id-in-gnulinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>
	</item>
		<item>
		<title>C Program to add elements of an array using Divide and Conquer approach</title>
		<link>http://hackintoshrao.wordpress.com/2012/02/12/c-program-to-add-elements-of-an-array-using-divide-and-conquer-approach/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/02/12/c-program-to-add-elements-of-an-array-using-divide-and-conquer-approach/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:35:15 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[C and C++ Programming]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/02/12/c-program-to-add-elements-of-an-array-using-divide-and-conquer-approach/</guid>
		<description><![CDATA[#include&#60;stdio.h&#62;#include&#60;stdio.h&#62;int add(int ,int ,int *);int main(){    int *a,n,i,sum,mid;    printf(&#8220;\NEnter the no.of.elements: &#8220;);    scanf(&#8220;%d&#8221;,&#38;n);    a=(int *)malloc(n*sizeof(int));    for(i=0;i&#60;n;i++)     scanf(&#8220;%d&#8221;,a+i);    sum=add(0,n-1,a);    printf(&#8220;\nSum=%d&#8221;,sum);    return 0; } int add(int low,int high,int *a){    int mid;    if(high==low)     return a[low];    mid=(low+high)/2;    return add(low,mid,a)+add(mid+1,high,a);}<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=488&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />#include&lt;stdio.h&gt;<br />int add(int ,int ,int *);<br />int main()<br />{<br />    int *a,n,i,sum,mid;<br />    printf(&#8220;\NEnter the no.of.elements: &#8220;);<br />    scanf(&#8220;%d&#8221;,&amp;n);<br />    a=(int *)malloc(n*sizeof(int));<br />    for(i=0;i&lt;n;i++)<br />     scanf(&#8220;%d&#8221;,a+i);<br />    sum=add(0,n-1,a);<br />    printf(&#8220;\nSum=%d&#8221;,sum);<br />    return 0;</p>
<p>}</p>
<p>int add(int low,int high,int *a)<br />{<br />    int mid;<br />    if(high==low)<br />     return a[low];<br />    mid=(low+high)/2;<br />    return add(low,mid,a)+add(mid+1,high,a);<br />}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/488/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=488&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/02/12/c-program-to-add-elements-of-an-array-using-divide-and-conquer-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>
	</item>
		<item>
		<title>PROGRAM TO GET THE COMPLETE INFORMATION OF THE USER USING &#8220;getpwuid&#8221; system call in gnu/LINUX</title>
		<link>http://hackintoshrao.wordpress.com/2012/02/11/program-to-get-the-complete-information-of-the-user-using-getpwuid-system-call-in-gnulinux/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/02/11/program-to-get-the-complete-information-of-the-user-using-getpwuid-system-call-in-gnulinux/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 06:21:20 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/02/11/program-to-get-the-complete-information-of-the-user-using-getpwuid-system-call-in-gnulinux/</guid>
		<description><![CDATA[/*DOWNLOAD LINK OF THE FILE:http://www.slideshare.net/hackintoshrao/usrinfogetpwuid*//*HACKINTOSH RAO \m/ , codes for GNU/LINUX  PROGRAM TO GET THE COMPLETE INFORMATION OF THE USER USING &#8220;getpwuid&#8221; system call in gnu/LINUX  SYSTEM CALLS USED: 1) struct passwd *getpwuid(int uid);  DESCRIPTION: &#8220;getpwuid&#8221; system call takes uid of the a user as parameter and then fills in the entries of the built [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=486&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>/*DOWNLOAD LINK OF THE FILE:http://www.slideshare.net/hackintoshrao/usrinfogetpwuid*/<br />/*HACKINTOSH RAO \m/ , codes for GNU/LINUX<br />  PROGRAM TO GET THE COMPLETE INFORMATION OF THE USER USING &#8220;getpwuid&#8221; system call in gnu/LINUX<br />  SYS<a href="http://hackintoshrao.files.wordpress.com/2012/02/getpwuid.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2012/02/getpwuid.png?w=1014" alt="Image" /></a>TEM CALLS USED: 1) struct passwd *getpwuid(int uid);<br />  DESCRIPTION: &#8220;getpwuid&#8221; system call takes uid of the a user as parameter and then fills in the entries of the built in structure<br />              &#8216;passwd&#8217;( check out the header pwd.h under /usr/include to get the details of the passwd structure) and returns a<br />               pointer to it .Using the pointer the members of the structure are accessed to get the user info<br />                     2)uid_t/int getuid()<br />  DESCRIPTION:&#8217;getuid&#8217; system call returns UID of a user who runs the executable of the code*/<br />#include&lt;pwd.h&gt; //header for getpwuid system call<br />#include&lt;unistd.h&gt;//header for getuid system call<br />#include&lt;stdlib.h&gt;<br />int main()<br />{<br />    struct passwd *usrinfo;<br />    usrinfo=getpwuid(getuid());<br />    printf(&#8220;\nUser name: %s&#8221;,usrinfo-&gt;pw_name);<br />    printf(&#8220;\n\nUserID:%d&#8221;,usrinfo-&gt;pw_uid);<br />    printf(&#8220;\n\nEncrypted password of the user:%s&#8221;,usrinfo-&gt;pw_passwd);<br />    printf(&#8220;\n\nGroup ID:%d&#8221;,usrinfo-&gt;pw_gid);<br />    printf(&#8220;\n\nReal name:%s&#8221;,usrinfo-&gt;pw_gecos);<br />    printf(&#8220;\n\nHOME DIRECTORY OF THE USER:%s&#8221;,usrinfo-&gt;pw_dir);<br />    printf(&#8220;\n\nDefault login shell:%s\n\n\n\n&#8221;,usrinfo-&gt;pw_shell);</p>
<p>    return 0;</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/486/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=486&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/02/11/program-to-get-the-complete-information-of-the-user-using-getpwuid-system-call-in-gnulinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/02/getpwuid.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>SIMPLE TEMPORARY TEXT EDITOR USING QT IN GNU/LINUX</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:52:53 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[GUI programming in GNU/LINUX]]></category>
		<category><![CDATA[My simple Qt creations in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/</guid>
		<description><![CDATA[<a href="http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/"><img src="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor11.png" alt="HACKINTOSH EDITOR " class="size-full wp-image-459" /></a><p>This text editor doesnt contain any options like saving the file or other editor ....Its just a simplest one of its kind</p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=472&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor21.png"><img src="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor21.png?w=614&#038;h=345" alt="" title="HACKEDITOR2" width="614" height="345" class="alignnone size-full wp-image-474" /></a><a href="http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/"><img src="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor11.png?w=614" alt="HACKINTOSH EDITOR " class="size-full wp-image-459" /></a>
<p>This text editor doesnt contain any options like saving the file or other editor &#8230;.Its just a simplest one of its kind</p>
<p><a href="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor12.png"><img src="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor12.png?w=614&#038;h=345" alt="" title="HAckeditor1" width="614" height="345" class="alignnone size-full wp-image-477" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/472/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/472/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=472&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/18/hackintosh-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor21.png" medium="image">
			<media:title type="html">HACKEDITOR2</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor11.png" medium="image">
			<media:title type="html">HACKINTOSH EDITOR </media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/hackeditor12.png" medium="image">
			<media:title type="html">HAckeditor1</media:title>
		</media:content>
	</item>
		<item>
		<title>A Simple guide to write programs which can be made use only by a specific user in A GNU/LINUX system using getuid and getlogin system calls</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/12/a-simple-guide-to-write-programs-which-can-be-made-use-only-by-a-specific-user-in-a-gnulinux-system-using-getuid-and-getlogin-system-calls/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/12/a-simple-guide-to-write-programs-which-can-be-made-use-only-by-a-specific-user-in-a-gnulinux-system-using-getuid-and-getlogin-system-calls/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 16:56:38 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/12/a-simple-guide-to-write-programs-which-can-be-made-use-only-by-a-specific-user-in-a-gnulinux-system-using-getuid-and-getlogin-system-calls/</guid>
		<description><![CDATA[/* hackintosh rao \m/ , codes for GNU/LINUX   Illustration of code which can only be made use  System calls used:1) uid_t getuid(void);                    2) char *getlogin(void); */#include&#60;stdlib.h&#62;#include&#60;unistd.h&#62;#include&#60;sys/types.h&#62;int main(){    uid_t uid;/*uid_t is a build in data type, which can hold small numbers*/    char* username;    uid=getuid();    username=getlogin();    if(uid==1000)//uid of user karthic    {        printf(&#8220;\nUID is:%d\nWELCOME Username:%s\n\n\n &#8220;,uid,username);        printf(&#8220;\nI AM [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=449&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>/* hackintosh rao \m/ , codes for GNU/LINUX<br />   Illustration of code which can only be made use<br />  System calls used:1) uid_t getuid(void);<br />                    2) char *getlogin(void); */<br />#include&lt;stdlib.h&gt;<br />#include&lt;unistd.h&gt;<br />#include&lt;sys/types.h&gt;<br />int main()<br />{<br />    uid_t uid;/*uid_t is a build in data type, which can hold small numbers*/<br />    char* username;<br />    uid=getuid();<br />    username=getlogin();<br />    if(uid==1000)//uid of user karthic<br />    {<br />        printf(&#8220;\nUID is:%d\nWELCOME Username:%s\n\n\n &#8220;,uid,username);<br />        printf(&#8220;\nI AM AT YOUR SERVICE\n\n&#8221;);<br />        /*write functionalities here which can only be made use by user with UId 1000*/<br />        /*not even can root can unlock this,if if root executes the code he cannot make use of it*/</p>
<p>    }<br />    else<br />     printf(&#8220;\nWrong User, the program is authorized to be used only by %s\n\n&#8221;,username);</p>
<p>    return 0;<br />}<br /><a href="http://hackintoshrao.files.wordpress.com/2012/01/specific-user1.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2012/01/specific-user1.png?w=1014" alt="Image" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/449/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=449&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/12/a-simple-guide-to-write-programs-which-can-be-made-use-only-by-a-specific-user-in-a-gnulinux-system-using-getuid-and-getlogin-system-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/specific-user1.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Program to print the user ID and Username in GNU/LINUX using getuid and getlogin system calls</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/12/program-to-print-the-user-id-and-username-in-gnulinux-using-getuid-and-getlogin-system-calls/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/12/program-to-print-the-user-id-and-username-in-gnulinux-using-getuid-and-getlogin-system-calls/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 15:24:19 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/12/program-to-print-the-user-id-and-username-in-gnulinux-using-getuid-and-getlogin-system-calls/</guid>
		<description><![CDATA[/* hackintosh rao \m/ , codes for GNU/LINUX   program to print the user ID and username  System calls used:1) uid_t getuid(void);                    2) char *getlogin(void); */#include&#60;stdlib.h&#62;#include&#60;unistd.h&#62;#include&#60;sys/types.h&#62;int main(){    uid_t uid;/*uid_t is a build in data type, which can hold small numbers*/    char* username;    uid=getuid();    username=getlogin();    printf(&#8220;\nUID is:%d\nUsername:%s\n\n\n &#8220;,uid,username);    return 0;}<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=439&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>/* hackintosh rao \m/ , codes for GNU/LINUX<br />   program to print the user ID and username<br />  System calls used:1) uid_t getuid(void);<br />                    2) char *getlogin(void); */<br />#include&lt;stdlib.h&gt;<a href="http://hackintoshrao.files.wordpress.com/2012/01/username-and-id1.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2012/01/username-and-id1.png?w=1014" alt="Image" /></a><br />#include&lt;unistd.h&gt;<br />#include&lt;sys/types.h&gt;<br />int main()<br />{<br />    uid_t uid;/*uid_t is a build in data type, which can hold small numbers*/<br />    char* username;<br />    uid=getuid();<br />    username=getlogin();<br />    printf(&#8220;\nUID is:%d\nUsername:%s\n\n\n &#8220;,uid,username);<br />    return 0;<br />}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/439/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=439&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/12/program-to-print-the-user-id-and-username-in-gnulinux-using-getuid-and-getlogin-system-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/username-and-id1.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>System program in GNU/LINUX to get time of 5 countries using gmtime and time system call</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/05/system-program-in-gnulinux-to-get-time-of-5-countries-using-gmtime-and-time-system-call/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/05/system-program-in-gnulinux-to-get-time-of-5-countries-using-gmtime-and-time-system-call/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 15:14:50 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>
		<category><![CDATA[gmt in linux]]></category>
		<category><![CDATA[gmtime system call]]></category>
		<category><![CDATA[system call in gnu/linux]]></category>
		<category><![CDATA[system programming in gnu/linux]]></category>
		<category><![CDATA[time in gnu/linux]]></category>
		<category><![CDATA[time system call]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/05/system-program-in-gnulinux-to-get-time-of-5-countries-using-gmtime-and-time-system-call/</guid>
		<description><![CDATA[//download link for the file:http://www.slideshare.net/hackintoshrao/countrytimec /*HACKINTOSH RAO \M/ CODES FOR GNU LINUX  SYSTEM CALLS USED:1)time_t time(time_t *);                    2)struct tm *gmtime(time_t *);  DESCRIPTION:AFTER CALLING &#8220;time&#8221; system call the returned value of type time_t(%ld) is stored first;              then the same address of the same value is to be sent to &#8220;gmtime&#8221; system call;              gmtime returns a pointer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=418&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>//download link for the file:http://www.slideshare.net/hackintoshrao/countrytimec</p>
<p>/*HACKINTOSH RAO \M/ CODES FOR GNU LINUX<br />  SYSTEM CALLS USED:1)time_t time(time_t *);<br />                    2)struct tm *gmtime(time_t *);<br />  DESCRIPTION:AFTER CALLING &#8220;time&#8221; system call the returned value of type time_t(%ld) is stored first;<br />              then the same address of the same value is to be sent to &#8220;gmtime&#8221; system call;<br />              gmtime returns a pointer to the built in structure tm;<br />              then the pointer is used to access the members of the structure which will be filled with<br />              the information about the time , date ,day , year etc&#8230;&#8230;&#8230;.<br />              In this program just fetching the time and year using the pointer to the structure is illustrated<br />              &#8220;gmtime&#8221; returns time in GMT and function timeconversion is used to change it to time of a given country*/<br />#include&lt;stdio.h&gt;<br />#include&lt;stdlib.h&gt;<br />#include&lt;unistd.h&gt;<br />#include&lt;time.h&gt;<br />void timeconversion(int *hour,int *min,int diff_hour,int diff_min);<br />/* timeconversion function is used to convert GMT to time of a given country using the difference from GMT ex:INDIA +5.30 GMT*/<br />void align(void);<br />int main()<br />{<br />    time_t time_in_sec;/*built in data type to store very large numbers*/<br />    int hour,min,choice,diff_hour,diff_min;<br />    struct tm *timestructure;/*built in structure with members which fill the details like day,time and so on*/</p>
<p>  for(;;)<br />  {<br />    time_in_sec=time(&amp;time_in_sec);<br />    timestructure=gmtime(&amp;time_in_sec);<br />    hour=timestructure-&gt;tm_hour;<br />    min=timestructure-&gt;tm_min;<br />    printf(&#8220;\n\t1.GMT\n\t2.Indian Standard Time\n\t3.WASHINGTON D.C(U.S.A)\n\t4.LONDON U.K\n\t5.U.A.E\n\t6.AUSTRALIA\n\t7.EXIT\n&#8221;);<br />    printf(&#8220;Enter 1 for GMT or Choose the country: &#8220;);<br />    scanf(&#8220;%d&#8221;,&amp;choice);<br />    switch(choice)<br />    {</p>
<p>        case 2:diff_hour=5;//IST is +5.30 hours ahead of GMT<br />               diff_min=30;<br />               timeconversion(&amp;hour,&amp;min,diff_hour,diff_min);</p>
<p>               align();<br />               printf(&#8220;Indian standard Time: %02d:%02d:%02d &#8220;,hour,min,timestructure-&gt;tm_sec);<br />               align();<br />               break ;<br />        case 1:align();<br />                printf(&#8220;GMT: %02d:%02d:%02d &#8220;,timestructure-&gt;tm_hour,timestructure-&gt;tm_min,timestructure-&gt;tm_sec);<br />                align();<br />                break;<br />        case 3:diff_hour=-5;//time in USA is +5.30 hours ahead of GMT<br />               diff_min=0;<br />               timeconversion(&amp;hour,&amp;min,diff_hour,diff_min);</p>
<p>               align();<br />               printf(&#8220;WASHINGTON D.C U.S.A: %02d:%02d:%02d &#8220;,hour,min,timestructure-&gt;tm_sec);<br />               align();<br />               break ;<br />        case 4:diff_hour=0;//IST is +5.30 hours ahead of GMT<br />               diff_min=0;<br />               timeconversion(&amp;hour,&amp;min,diff_hour,diff_min);</p>
<p>               align();<br />               printf(&#8220;UK: %02d:%02d:%02d &#8220;,hour,min,timestructure-&gt;tm_sec);<br />               align();<br />               break ;<br />        case 5:diff_hour=4;//IST is +5.30 hours ahead of GMT<br />               diff_min=0;<br />               timeconversion(&amp;hour,&amp;min,diff_hour,diff_min);</p>
<p>               align();<br />               printf(&#8220;UAE: %02d:%02d:%02d &#8220;,hour,min,timestructure-&gt;tm_sec);<br />               align();<br />               break ;<br />        case 6:diff_hour=11;//IST is +5.30 hours ahead of GMT<br />               diff_min=0;<br />               timeconversion(&amp;hour,&amp;min,diff_hour,diff_min);</p>
<p>               align();<br />               printf(&#8220;MELBOURNE,AUSTRALIA: %02d:%02d:%02d &#8220;,hour,min,timestructure-&gt;tm_sec);<br />               align();<br />               break ;<br />        case 7:exit(0);</p>
<p>        default:align();<br />                printf(&#8220;SELECT THE WRIGHT OPTION&#8221;);<br />                align();</p>
<p>    }<br />  }<br />}<br />void timeconversion(int *hour,int *min,int diff_hour,int diff_min)<br />{</p>
<p>               *hour=(*hour+diff_hour)%24;/*so a simple math to convert GMT to time of a given country*/<br />               *min=*min+diff_min;<br />               if((*min)&gt;=60)<br />              {<br />                    *hour=(*hour+1)%24;<br />                    *min=*min-60;</p>
<p>              }</p>
<p>}<br />void align()//function just to get the alignments right<br />{<br />    printf(&#8220;\n\n*************************************************************************\n\n&#8221;);<br />}<br /><a href="http://hackintoshrao.files.wordpress.com/2012/01/countrytime1.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2012/01/countrytime1.png?w=1014" alt="Image" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/418/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=418&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/05/system-program-in-gnulinux-to-get-time-of-5-countries-using-gmtime-and-time-system-call/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/countrytime1.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Illustration of time,diffitme and sleep system call in GNU/LINUX</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/04/illustration-of-timediffitme-and-sleep-system-call-in-gnulinux/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/04/illustration-of-timediffitme-and-sleep-system-call-in-gnulinux/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 17:11:16 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/04/illustration-of-timediffitme-and-sleep-system-call-in-gnulinux/</guid>
		<description><![CDATA[//download link for the file:http://www.slideshare.net/hackintoshrao/timesleep/* HACKINTOSHRAO , CODES FOR GNU/LINUX \m/   simple illustration of time and difftime system call in GNU/LINUX   system calls used: 1)time_t time(time *) ;go to /usr/include and use &#8220;grep time_t *&#8221;                      2)double difftime(time2,time1);go to /usr/include and use &#8220;grep -l difftime *&#8221;                      3)void sleep(int sec);                      */ #include&#60;stdio.h&#62;#include&#60;stdlib.h&#62;#include&#60;unistd.h&#62;#include&#60;time.h&#62; int main(){    time_t time_1970,time2_1970;//time_t is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=383&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>//download link for the file:http://www.slideshare.net/hackintoshrao/timesleep<br />/* HACKINTOSHRAO , CODES FOR GNU/LINUX \m/<br />   simple illustration of time and difftime system call in GNU/LINUX<br />   system calls used: 1)time_t time(time *) ;go to /usr/include and use &#8220;grep time_t *&#8221;<br />                      2)double difftime(time2,time1);go to /usr/include and use &#8220;grep -l difftime *&#8221;<br />                      3)void sleep(int sec);<br />                      */</p>
<p>#include&lt;stdio.h&gt;<br />#include&lt;stdlib.h&gt;<br />#include&lt;unistd.h&gt;<br />#include&lt;time.h&gt;</p>
<p>int main()<br />{<br />    time_t time_1970,time2_1970;//time_t is a built in data type and is used to store very large numbers<br />    int i;<br />    double timedifference;<br />    for(i=0;i&lt;10;i++)<br />    {</p>
<p>        time_1970=time((time_t *)0);<br />        /*time system call takes in a NULL argument and returns no.of.seconds eclapsed since 1970*/</p>
<p>        printf(&#8220;\nThe no.of.seconds passed from 1970 is:%ld &#8220;,time_1970);<br />        sleep(3);<br />        /*sleep system call halts or pauses the execution for no.of.seconds mentioned as arguments to the call*/<br />        time2_1970=time((time_t *)0);<br />        timedifference=difftime(time2_1970,time_1970);<br />        /*difftime is a system call which returns back the time difference in seconds as a double b/w its 1st and 2nd argument of type time_t*/<br />        printf(&#8220;\n\nHey !! The program was paused for %f seconds&#8221;,timedifference);</p>
<p>    }<br />    exit(0);<br />}<br /><a href="http://hackintoshrao.files.wordpress.com/2012/01/timesleep2.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2012/01/timesleep2.png?w=1014" alt="Image" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/383/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=383&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/04/illustration-of-timediffitme-and-sleep-system-call-in-gnulinux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2012/01/timesleep2.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Illustration of sleep system systm call in GNU/LINUX using a simple program</title>
		<link>http://hackintoshrao.wordpress.com/2012/01/02/illustration-of-sleep-system-systm-call-in-gnulinux-using-a-simple-program/</link>
		<comments>http://hackintoshrao.wordpress.com/2012/01/02/illustration-of-sleep-system-systm-call-in-gnulinux-using-a-simple-program/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 11:40:16 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2012/01/02/illustration-of-sleep-system-systm-call-in-gnulinux-using-a-simple-program/</guid>
		<description><![CDATA[//download link for the file: http://www.slideshare.net/hackintoshrao/time2c-10761496/* Hackintosh Rao , Codes for GNU/LINUX \m/ *//*system calls used :sleep(int sec)         *//*Sleep system call pauses the execution of instructions for specified no.of.seconds*/#include&#60;stdio.h&#62;#include&#60;unistd.h&#62;#include&#60;stdlib.h&#62;#include&#60;time.h&#62;int main(){    int i;    for(i=0;i&#60;10;i++)      printf(&#8220;\n\t\tWithout time delay&#8221;);      sleep(2);    printf(&#8220;\nWait and watch how the execution halts for 2 seconds each time when SLEEP is called&#8221;);    sleep(2);    printf(&#8220;\nLOADING&#8221;);    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=379&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>//download link for the file: http://www.slideshare.net/hackintoshrao/time2c-10761496<br />/* Hackintosh Rao , Codes for GNU/LINUX \m/ */<br />/*system calls used :sleep(int sec)         */<br />/*Sleep system call pauses the execution of instructions for specified no.of.seconds*/<br />#include&lt;stdio.h&gt;<br />#include&lt;unistd.h&gt;<br />#include&lt;stdlib.h&gt;<br />#include&lt;time.h&gt;<br />int main()<br />{<br />    int i;<br />    for(i=0;i&lt;10;i++)<br />      printf(&#8220;\n\t\tWithout time delay&#8221;);<br />      sleep(2);<br />    printf(&#8220;\nWait and watch how the execution halts for 2 seconds each time when SLEEP is called&#8221;);<br />    sleep(2);<br />    printf(&#8220;\nLOADING&#8221;);<br />    for(i=0;i&lt;10;i++)<br />     {<br />         printf(&#8220;\n# &#8220;);<br />         sleep(2) ;/*the argument for sleep system call is an integer duration in sec for which<br />                      you want the exection of the instructions to be put to pause */</p>
<p>     }<br />     exit(0);<br />}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/379/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=379&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2012/01/02/illustration-of-sleep-system-systm-call-in-gnulinux-using-a-simple-program/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>
	</item>
		<item>
		<title>Illustration of fork system call with the help of getpid system call in GNU/LINUX</title>
		<link>http://hackintoshrao.wordpress.com/2011/12/28/illustration-of-fork-system-call-with-the-help-of-getpid-system-call-in-gnulinux-2/</link>
		<comments>http://hackintoshrao.wordpress.com/2011/12/28/illustration-of-fork-system-call-with-the-help-of-getpid-system-call-in-gnulinux-2/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 05:26:14 +0000</pubDate>
		<dc:creator>KArthick.Rao</dc:creator>
				<category><![CDATA[System Programming in GNU/LINUX]]></category>

		<guid isPermaLink="false">http://hackintoshrao.wordpress.com/2011/12/28/illustration-of-fork-system-call-with-the-help-of-getpid-system-call-in-gnulinux-2/</guid>
		<description><![CDATA[//download link for the file http://www.slideshare.net/hackintoshrao/forkc/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; *//* HACKINTOSH RAO :CODES FOR GNU/LINUX \M/                                              *//*   This program runs two processes, a parent and a child.  Both of *//* them run the same loop printing some messages.  Note that printf()*//* YOU CAN SEE TWO DIFFERENT PROCESS ID&#8217;S PRINTED INDICATING THAT EXECTION IS PERFORMED BY TWO DIFFERENT [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=373&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>//download link for the file http://www.slideshare.net/hackintoshrao/forkc<br />/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; */<br />/* HACKINTOSH RAO :CODES FOR GNU/LINUX \M/                                              */<br />/*   This program runs two processes, a parent and a child.  Both of */<br />/* them run the same loop printing some messages.  Note that printf()*/<br />/* YOU CAN SEE TWO DIFFERENT PROCESS ID&#8217;S PRINTED INDICATING THAT EXECTION IS PERFORMED BY TWO DIFFERENT PROCESSES */</p>
<p>/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; */<br />/*system calls used :1)fork<br />                     2)getpid<br />*/<br />#include  &lt;stdio.h&gt;<br />#include  &lt;sys/types.h&gt;<br />#include &lt;unistd.h&gt;     //header for getpid system call ,to verify go to /usr/include and issue this command &#8220;grep -l getpid * &#8220;</p>
<p>#define   MAX_COUNT  200</p>
<p>void  ChildProcess(void);                /* child process prototype  */<br />void  ParentProcess(void);               /* parent process prototype */</p>
<p>void  main(void)<br />{<br />     pid_t  pid;</p>
<p>     pid = fork();        //fork system call takes no parameters<br />                   //a New process in created a the instructions to follow will be parallely executed<br />     if (pid == 0)<br />          ChildProcess();<br />     else<br />          ParentProcess();<br />     /*In a normal programming scenario ,Depending on the value of pid either the child process or the parent process function is supposed to be called<br />       but in this case both the functions gets called as parallel execution of statements takes place after the fork call*/<br />}<br />//THESE FUNCTIONS CLEARLY ILLUSTRATES THE LINES EXECUTED BY THE PARENT AND THE LINES EXCUTED BY THE CHILD<br />//you Will probably see different order of exection of child and parent functions .<br />void  ChildProcess(void)<br />{<br />     int   i;</p>
<p>     for (i = 1; i &lt;= MAX_COUNT; i++)<br />          printf(&#8220;   This line is from child, value = %d,with Process id %d:\n\n&#8221;, i,getpid());<br />     printf(&#8220;   *** END OF CHILD PRECESS ***\n&#8221;);<br />}</p>
<p>void  ParentProcess(void)<br />{<br />     int   i;</p>
<p>     for (i = 1; i &lt;= MAX_COUNT; i++)<br />          printf(&#8220;This line is from parent, value = %d,with process id %d:\n\n&#8221;, i,getpid());<br />     printf(&#8220;*** END OF PARENT***\ PROCESS\n&#8221;);<br />}<br /><a href="http://hackintoshrao.files.wordpress.com/2011/12/fork32.png"><img class="size-full wp-image" src="http://hackintoshrao.files.wordpress.com/2011/12/fork32.png?w=1014" alt="Image" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackintoshrao.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackintoshrao.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackintoshrao.wordpress.com/373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackintoshrao.wordpress.com&amp;blog=26641034&amp;post=373&amp;subd=hackintoshrao&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackintoshrao.wordpress.com/2011/12/28/illustration-of-fork-system-call-with-the-help-of-getpid-system-call-in-gnulinux-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d34894835e8c1ad3d9f03ac76b0ec948?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hackintoshrao</media:title>
		</media:content>

		<media:content url="http://hackintoshrao.files.wordpress.com/2011/12/fork32.png?w=1014" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
