<?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>void pointers | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/void-pointers/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 19 Jan 2012 07:22:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>what is Void Pointer?</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-faq/void-pointer/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-faq/void-pointer/#comments</comments>
		
		<dc:creator><![CDATA[Chitra]]></dc:creator>
		<pubDate>Thu, 19 Jan 2012 07:18:21 +0000</pubDate>
				<category><![CDATA[C Questions & Answers]]></category>
		<category><![CDATA[pointer concept]]></category>
		<category><![CDATA[pointers in c]]></category>
		<category><![CDATA[void pointer]]></category>
		<category><![CDATA[void pointers]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=2609</guid>

					<description><![CDATA[<p>Void pointer or generic pointer is a special type of pointer that can be pointed at objects of any data type. A void pointer is declared like a normal pointer, using the void keyword as the pointer’s type. Pointers defined using specific data type cannot hold the address of the some other type of variable</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/void-pointer/">what is Void Pointer?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Void pointer or generic pointer is a special type of pointer that can be pointed at objects of any data type. A void pointer is declared like a normal pointer, using the void keyword as the pointer’s type.</p>
<p>Pointers defined using specific data type cannot hold the address of the some other type of variable i.e., it is incorrect in C++ to assign the address of an integer variable to a pointer of type float.</p>
<p>Example: </p>
<pre lang="c" escaped="true">
float *f; //pointer of type float
int i;  //integer variable
f = &amp;i; //compilation error
</pre>
<p>The above problem can be solved by general purpose pointer called void pointer.</p>
<p>Void pointer can be declared as follows:</p>
<pre lang="c" escaped="true"> 
void *v // defines a pointer of type void
</pre>
<p>The pointer defined in this manner do not have any type associated with them and can hold the address of any type of variable.</p>
<p>Example:</p>
<pre lang="c" escaped="true">
void *v; 
int *i;
int ivar;
char chvar;
float fvar;
v = &amp;ivar; // valid
v = &amp;chvar; //valid
v = &amp;fvar; // valid
i = &amp;ivar; //valid
i = &amp;chvar; //invalid
i = &amp;fvar; //invalid
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/void-pointer/">what is Void Pointer?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-faq/void-pointer/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
