<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: what is void *   ??</title>
	<atom:link href="https://www.emblogic.com/blog/01/what-is-void/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog/01/what-is-void/</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Mon, 07 Oct 2013 04:00:03 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>By: manoj7410</title>
		<link>https://www.emblogic.com/blog/01/what-is-void/#comment-583</link>
		<dc:creator><![CDATA[manoj7410]]></dc:creator>
		<pubDate>Wed, 01 Feb 2012 04:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=1733#comment-583</guid>
		<description><![CDATA[thanx.... now I got it...]]></description>
		<content:encoded><![CDATA[<p>thanx&#8230;. now I got it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mandar</title>
		<link>https://www.emblogic.com/blog/01/what-is-void/#comment-557</link>
		<dc:creator><![CDATA[Mandar]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 08:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=1733#comment-557</guid>
		<description><![CDATA[Basically void means &quot;nothing&quot; or &quot;no type&quot;

There are 3 basic ways that void is used:

1) Function argument: int myFunc(void) -- the function takes nothing. 

2) Function return value: void myFunc(int) -- the function returns nothing

3) Generic data pointer: void* data; -- &#039;data&#039; is a pointer to data of unknown type, and cannot be dereferenced.
finally we can say that void indicates the absence of type, it is not something you can dereference or assign to.]]></description>
		<content:encoded><![CDATA[<p>Basically void means &#8220;nothing&#8221; or &#8220;no type&#8221;</p>
<p>There are 3 basic ways that void is used:</p>
<p>1) Function argument: int myFunc(void) &#8212; the function takes nothing. </p>
<p>2) Function return value: void myFunc(int) &#8212; the function returns nothing</p>
<p>3) Generic data pointer: void* data; &#8212; &#8216;data&#8217; is a pointer to data of unknown type, and cannot be dereferenced.<br />
finally we can say that void indicates the absence of type, it is not something you can dereference or assign to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhanashri</title>
		<link>https://www.emblogic.com/blog/01/what-is-void/#comment-556</link>
		<dc:creator><![CDATA[dhanashri]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 08:01:38 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=1733#comment-556</guid>
		<description><![CDATA[Void pointer is a pointer that points to user defined data element. The advantage of void pointer is, same pointer can be used for various tasks by type casting it. Example is explained here. 
   
int main()
{
        float fl;
        int i;
        char ch;
        void *ptr;

        ch = &#039;c&#039;;
        ptr = &amp;ch;
        printf(&quot;%c\n&quot;,*(char *)ptr);

        i = 10;
        ptr = &amp;i;
        printf(&quot;%d\n&quot;, *(int *)ptr);

        fl = 12.0;
        ptr = &amp;fl;
        printf(&quot;%f\n&quot;, *(float *)ptr);

        return 0;
}]]></description>
		<content:encoded><![CDATA[<p>Void pointer is a pointer that points to user defined data element. The advantage of void pointer is, same pointer can be used for various tasks by type casting it. Example is explained here. </p>
<p>int main()<br />
{<br />
        float fl;<br />
        int i;<br />
        char ch;<br />
        void *ptr;</p>
<p>        ch = &#8216;c&#8217;;<br />
        ptr = &amp;ch;<br />
        printf(&#8220;%c\n&#8221;,*(char *)ptr);</p>
<p>        i = 10;<br />
        ptr = &amp;i;<br />
        printf(&#8220;%d\n&#8221;, *(int *)ptr);</p>
<p>        fl = 12.0;<br />
        ptr = &amp;fl;<br />
        printf(&#8220;%f\n&#8221;, *(float *)ptr);</p>
<p>        return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhanashri</title>
		<link>https://www.emblogic.com/blog/01/what-is-void/#comment-555</link>
		<dc:creator><![CDATA[dhanashri]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 05:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=1733#comment-555</guid>
		<description><![CDATA[Pointer is a variable that points to the variable element to which it is defined. Example, int *ptr, this is the pointer which is pointing to the int var element. Void *, points to any user defined data type, so same pointer can be used in a program for various data types. Only thing, you need to type cast  it whenever you use it with any data type. 
Ex is explained below for this:

int main()
{
void *ptr;
int i;
char ch;
float h;
i = 10;
ptr = &amp;i;
printf(&quot;%d\n&quot;,*(int *)ptr); 
ch = &#039;c&#039;;
ptr = &amp;ch;
printf(&quot;%c&quot;,*(char *)ptr);
h = 56.9;
ptr = &amp;h;
printf(&quot;%f&quot;,*(float *)ptr);
}]]></description>
		<content:encoded><![CDATA[<p>Pointer is a variable that points to the variable element to which it is defined. Example, int *ptr, this is the pointer which is pointing to the int var element. Void *, points to any user defined data type, so same pointer can be used in a program for various data types. Only thing, you need to type cast  it whenever you use it with any data type.<br />
Ex is explained below for this:</p>
<p>int main()<br />
{<br />
void *ptr;<br />
int i;<br />
char ch;<br />
float h;<br />
i = 10;<br />
ptr = &amp;i;<br />
printf(&#8220;%d\n&#8221;,*(int *)ptr);<br />
ch = &#8216;c&#8217;;<br />
ptr = &amp;ch;<br />
printf(&#8220;%c&#8221;,*(char *)ptr);<br />
h = 56.9;<br />
ptr = &amp;h;<br />
printf(&#8220;%f&#8221;,*(float *)ptr);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
