<?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>Just for you</title>
	<atom:link href="http://devipriya.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://devipriya.wordpress.com</link>
	<description>Blog contains Q &#38; A focussed to Technical (IT) interview.</description>
	<lastBuildDate>Thu, 19 May 2011 15:03:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devipriya.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Just for you</title>
		<link>http://devipriya.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devipriya.wordpress.com/osd.xml" title="Just for you" />
	<atom:link rel='hub' href='http://devipriya.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Some C++ questions</title>
		<link>http://devipriya.wordpress.com/2007/01/05/some-c-questions/</link>
		<comments>http://devipriya.wordpress.com/2007/01/05/some-c-questions/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 05:31:54 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2007/01/05/some-c-questions/</guid>
		<description><![CDATA[1. What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&#38;v); cout&#60;&#60;v; } a) Outputs 12 b) Outputs 10 c) Outputs the address of v Ans b. 2. How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever Ans [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=21&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td class="bg2"><strong>1. What does the following do:</strong></td>
</tr>
<tr>
<td class="bg3">void afunction(int *x)<br />
{<br />
x=new int;<br />
*x=12;<br />
}<br />
int main()<br />
{<br />
int v=10;<br />
afunction(&amp;v);<br />
cout&lt;&lt;v;<br />
}<br />
a) Outputs 12<br />
b) Outputs 10<br />
c) Outputs the address of v</td>
</tr>
<tr>
<td class="bg3">Ans b.</td>
</tr>
<tr>
<td class="bg2"><strong>2. How long does this loop run: for(int x=0; x=3; x++) </strong></td>
</tr>
<tr>
<td class="bg3">a) Never<br />
b) Three times<br />
c) Forever</td>
</tr>
<tr>
<td class="bg3">Ans c.</td>
</tr>
<tr>
<td class="bg2"><strong>3. Which uses less memory? </strong></td>
</tr>
<tr>
<td class="bg3">a)<br />
struct astruct<br />
{<br />
int x;<br />
float y;<br />
int v;<br />
};b)<br />
union aunion<br />
{<br />
int x;<br />
float v;<br />
};</p>
<p>c)<br />
char array[10];</td>
</tr>
<tr>
<td class="bg3">Ans b.</td>
</tr>
<tr>
<td class="bg2"><strong>4. Evaluate:</strong></td>
</tr>
<tr>
<td class="bg3">int fn(int v)<br />
{<br />
if(v==1 || v==0)<br />
return 1;<br />
if(v%2==0)<br />
return fn(v/2)+2;<br />
else<br />
return fn(v-1)+3;<br />
}<br />
for fn(7);a) 10<br />
b) 11<br />
c) 1</td>
</tr>
<tr>
<td class="bg3">Ans b.</td>
</tr>
</table>
<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td class="bg2"><strong>5. Which of the Standard C++ casts can be used to perform a &#8220;safe&#8221; downcast:</strong></td>
</tr>
<tr>
<td class="bg3">a) reinterpret_cast<br />
b) dynamic_cast<br />
c) static_cast<br />
d) const_cast</td>
</tr>
<tr>
<td class="bg3">Ans b.</td>
</tr>
<tr>
<td class="bg2"><strong>6. class professor {};<br />
class teacher : public virtual professor {};<br />
class researcher : public virtual professor {};<br />
class myprofessor : public teacher, public researcher {};</p>
<p>Referring to the sample code above, if an object of class &#8220;myprofessor&#8221; were created, how many instances of professor will it contain? </strong></td>
</tr>
<tr>
<td class="bg3">a) 0<br />
b) 1<br />
c) 2<br />
d) 3<br />
e) 4</td>
</tr>
<tr>
<td class="bg3"><strong>Ans b.</strong> , here professor will be called a virtual base class since teacher and researcher derive from it virtually. This is used in multiple inheritance as shown here. If professor was not inherited virtually then there would be 2 instances of professor in the object of myprofessor.</td>
</tr>
<tr>
<td class="bg2"><strong>7. string somestring ;<br />
Which of the following choices will convert a standard C++ string object &#8220;somestring&#8221; to a C string? </strong></td>
</tr>
<tr>
<td class="bg3">a) Copy.somestring () ;<br />
b) somestring.c_str ()<br />
c) &amp;somestring [1]<br />
d) std::cstring (somestring)<br />
e) (char *) somestring</td>
</tr>
<tr>
<td class="bg3">Ans. b</td>
</tr>
<tr>
<td class="bg2"><strong>8.<br />
class basex<br />
{<br />
int x;<br />
public:<br />
void setx(int y) {x=y;}<br />
};<br />
class derived : basex {};<br />
What is the access level for the member function &#8220;setx&#8221; in the class &#8220;derived&#8221; above? </strong></td>
</tr>
<tr>
<td class="bg3">a) private<br />
b) local<br />
c) global<br />
d) public<br />
e) protected</td>
</tr>
<tr>
<td class="bg3">Ans. a<strong><br />
Table of Member Access Privileges<br />
</strong></p>
<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td>Access in Base Class</td>
<td>Base Class Inherited as</td>
<td>Access in<br />
Derived Class</td>
</tr>
<tr>
<td>Public Protected Private</td>
<td>Public</td>
<td>Public Protected No access*</td>
</tr>
<tr>
<td>Public Protected Private</td>
<td>Protected</td>
<td>Public Protected No access*</td>
</tr>
<tr>
<td>Public Protected Private</td>
<td>Private</td>
<td>Public Protected No access*</td>
</tr>
</table>
<p>* Unless friend declarations within the base class explicitly grant access.<br />
So, the highest member accessibility is defined by the way a class is inherited, if it is inherited privately, then the highest member accessibility will be private. Default inheritance is private.<strong> </strong></td>
</tr>
</table>
<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td class="bg2"><strong>9.<br />
class Alpha {<br />
public:<br />
char data[10000];<br />
Alpha();<br />
~Alpha();<br />
};<br />
class Beta {<br />
public:<br />
Beta() { n = 0; }<br />
void FillData(Alpha a); </strong><strong>private:<br />
int n;<br />
};<br />
How do you make the above sample code more efficient? </strong></td>
</tr>
<tr>
<td class="bg3">a) If possible, make the constructor for Beta private to reduce the overhead of public constructors.<br />
b) Change the return type in FillData to int to negate the implicit return conversion from &#8220;int&#8221; to &#8220;void&#8221;.<br />
c) Make the destructor for Alpha virtual.<br />
d) Make the constructor for Alpha virtual.<br />
e) Pass a const reference to Alpha in FillData</td>
</tr>
<tr>
<td class="bg3"><strong>Ans e</strong>. since u r passing a reference hence a new array will not be created in memory, whereas if u pass by value, then an array of 10000 chars will be created. Passing by reference only creates an alias for the original parameter (i.e., it points to the original parameter) and is same as passing by address, the only difference is that it can be used like an object instead of as a pointer, i.e., if param is &amp;a, then u will write a.member, whereas if param is *a then u will write a-&gt;member.</td>
</tr>
<tr>
<td class="bg2"><strong>10.<br />
class Foo {<br />
int x;<br />
public:<br />
Foo(int I);<br />
};<br />
If a class does not have a copy constructor explicitly defined one will be implicitly defined for it. Referring to the sample code above, which one of the following declarations is the implicitly created copy constructor? </strong></td>
</tr>
<tr>
<td class="bg3">a) Foo(Foo *f);<br />
b) Foo(Foo &amp;f);<br />
c) Foo(const Foo *f);<br />
d) Foo(const Foo &amp;f);<br />
e) Foo(int);</td>
</tr>
<tr>
<td class="bg3"><strong>Ans d</strong>. copy constructor takes an arg of its own type which is passed by ref and which should not be changed hence it is const</td>
</tr>
<tr>
<td class="bg2"><strong>11.<br />
class HasStatic {<br />
static int I;<br />
};<br />
Referring to the sample code above, what is the appropriate method of defining the member variable &#8220;I&#8221;, and assigning it the value 10, outside of the class declaration? </strong></td>
</tr>
<tr>
<td class="bg3">a) HasStatic I = 10;<br />
b) int static I = 10;<br />
c) static I(10);<br />
d) static I = 10;<br />
e) int HasStatic::I = 10;</td>
</tr>
<tr>
<td class="bg3">Ans. e</td>
</tr>
<tr>
<td class="bg2"><strong>12.<br />
class X<br />
{<br />
private:<br />
int a;<br />
protected:<br />
X(){cout&lt;&lt;&#8221;X constructor was called&#8221;&lt;&lt;endl;}<br />
~X(){cout&lt;&lt;&#8221;X destructor was called&#8221;&lt;&lt;endl}<br />
};<br />
Referring to the code above, which one of the following statements regarding &#8220;X&#8221; is TRUE? </strong></td>
</tr>
<tr>
<td class="bg3">a) X is an abstract class.<br />
b) Only subclasses of X may create X objects.<br />
c) Instances of X cannot be created.<br />
d) X objects can only be created using the default copy constructor.<br />
e) Only friends can create instances of X objects.</td>
</tr>
<tr>
<td class="bg3"><strong>Ans b</strong>. instances of X can be created only inside its subclasses.</td>
</tr>
</table>
<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td class="bg2"><strong>13.<br />
class Foo {<br />
const int x;<br />
protected:<br />
Foo(int f);<br />
~Foo();<br />
};<br />
Foo f;<br />
Referring to the sample code above, why will the class declaration not compile? </strong></td>
</tr>
<tr>
<td class="bg3">a) The variable x is const.<br />
b) The destructor is protected.<br />
c) The destructor is not public.<br />
d) The constructor is protected.<br />
e) There is no default constructor.</td>
</tr>
<tr>
<td class="bg3"><strong>Ans e.</strong> if u don&#8217;t specify a constructor for a class, then the compiler generates the default constructor for u, but if u specify a constructor apart from the default constructor, then u must give the default constructor also, but only if u r creating an object which uses the default constructor. i.e., the following code is perfectly fine<br />
class Foo {<br />
public:<br />
Foo(int f){}<br />
~Foo(){}<br />
};<br />
Foo f(0);But if u try to create an object of Foo like this<br />
Foo f;<br />
then this will give compiler error because there is no default constructor available</td>
</tr>
<tr>
<td class="bg2"><strong>14.<br />
class Foo {<br />
public:<br />
Foo(int i) { }<br />
};<br />
class Bar : virtual Foo {<br />
public:<br />
Bar() { }<br />
}; </strong><strong>Bar b; </strong></p>
<p><strong>Referring to the above code, when the object &#8216;b&#8217; is defined, a compiler error will occur. What action fixes the compiler error? </strong></td>
</tr>
<tr>
<td class="bg3">a) Adding a virtual destructor to the class Bar<br />
b) Adding a constructor to Bar which takes an int parameter<br />
c) Adding &#8220;Foo()&#8221; to the Bar constructor<br />
d) Adding a copy constructor to the class Foo<br />
e) Adding &#8220;Foo(0)&#8221; to the Bar::Bar initializer list</td>
</tr>
<tr>
<td class="bg3">Ans e.</td>
</tr>
<tr>
<td class="bg2"><strong>15. Which one of the following describes characteristics of &#8220;protected&#8221; inheritance? </strong></td>
</tr>
<tr>
<td class="bg3">a) The base class has access only to the public or protected members of the derived class.<br />
b) The derived class has non-public, inheritable, access to all but the private members of the base class.<br />
c) The derived class has access to all members of the base class.<br />
d) The private members of the base class are visible within the derived class.<br />
e) Public members of the derived class are privately accessible from the base class.</td>
</tr>
<tr>
<td class="bg3">Ans b.</td>
</tr>
<tr>
<td class="bg2"><strong>16. The &#8220;virtual&#8221; specifier in a member function enables which one of the following? </strong></td>
</tr>
<tr>
<td class="bg3">a) Monmorphism<br />
b) Late binding<br />
c) Metamorphism<br />
d) Solomorphism<br />
e) Inheritance</td>
</tr>
<tr>
<td class="bg3"><strong>Ans b.</strong> consider a base class B having a virtual function Foo, and a class D derived from this class also having a function Foo. Then when u create an object of a derived class, say dobj, and a ptr to base class, say pb, and point pb to dobj by saying pb = &amp;dobj, and then call pb-&gt;Foo then the correct version of Foo will be called, i.e., the version in D will be called becz the object is of type D. this is called late binding, i.e., deferring the decision of calling which version of Foo until runtime since at compile time the type of object to which pb points may not be known.<br />
class B {public: virtual void Foo(){cout&lt;&lt;&#8221;base&#8221;;}};<br />
class D : public B {public: virtual void Foo(){cout&lt;&lt;&#8221;derv&#8221;;}};<br />
D dobj;<br />
B *pb;<br />
pb = &amp;dobj;<br />
pb-&gt;Foo();the output will be &#8216;derv&#8217;.<br />
If Foo was not declared virtual in base class B , then the output would have been &#8216;base&#8217;.</td>
</tr>
</table>
<table border="0" width="100%" cellPadding="5" cellSpacing="1">
<tr>
<td class="bg2"><strong>17.<br />
class X<br />
{<br />
public:<br />
int x;<br />
static void f(int z);<br />
};<br />
void X::f(int y) {x=y;}<br />
What is the error in the sample code above? </strong></td>
</tr>
<tr>
<td class="bg3">a) The class X does not have any protected members.<br />
b) The static member function f() accesses the non-static z.<br />
c) The static member function f() accesses the non-static x.<br />
d) The member function f() must return a value.<br />
e) The class X does not have any private members.</td>
</tr>
<tr>
<td class="bg3">Ans c.</td>
</tr>
<tr>
<td class="bg2"><strong>18.<br />
template&lt;class T, class X&gt; class Obj {<br />
T my_t;<br />
X my_x;<br />
public:<br />
Obj(T t, X x) : my_t(t), my_x(x) { }<br />
};<br />
Referring to the sample code above, which one of the following is a valid conversion operator for the type T?</strong></td>
</tr>
<tr>
<td class="bg3">a) T operator T () { return my_t; }<br />
b) T operator(T) const { return my_t; }<br />
c) operator(T) { return my_t; }<br />
d) T operator T (const Obj &amp;obj) { return obj.my_t; }<br />
e) operator T () const { return my_t; }</td>
</tr>
<tr>
<td class="bg3">Ans e.<br />
T his will be used for casting objects of type Obj to type T</p>
<p>class Myclass{};<br />
template&lt;class T, class X&gt; class Obj {<br />
T my_t;<br />
X my_x;<br />
public:<br />
Obj(T t, X x) : my_t(t), my_x(x) { }<br />
operator T () const { return my_t; }<br />
operator X () const { return my_x; }<br />
};</p>
<p>void main()<br />
{<br />
Myclass mt;<br />
Obj &lt;int , Myclass &gt; myobj(10,mt);<br />
int x = (int) myobj;<br />
cout &lt;&lt; x;<br />
Myclass mobj = (Myclass) myobj;</td>
</tr>
<tr>
<td class="bg2"><strong>19.<br />
catch(exception &amp;e)<br />
{<br />
. . .<br />
}<br />
Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that &#8220;e&#8221; refers to? </strong></td>
</tr>
<tr>
<td class="bg3">a) cout &lt;&lt; e.type();<br />
b) cout &lt;&lt; e.name();<br />
c) cout &lt;&lt; typeid(e).name();<br />
d) cout &lt;&lt; e.what();<br />
e) cout &lt;&lt; e;</td>
</tr>
<tr>
<td class="bg3">Ans. c</td>
</tr>
<tr>
<td class="bg2"><strong>20.<br />
int f() {<br />
int I = 12;<br />
int &amp;r = I;<br />
r += r / 4;<br />
int *p = &amp;r;<br />
*p += r;<br />
return I;<br />
}<br />
Referring to the sample code above, what is the return value of the function &#8220;f()&#8221;? </strong></td>
</tr>
<tr>
<td class="bg3">a) 12<br />
b) 15<br />
c) 24<br />
d) 17<br />
e) 30</td>
</tr>
<tr>
<td class="bg3">Ans e.</td>
</tr>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=21&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2007/01/05/some-c-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple simulation of MS-DOS prompt</title>
		<link>http://devipriya.wordpress.com/2007/01/04/simple-simulation-of-ms-dos-prompt/</link>
		<comments>http://devipriya.wordpress.com/2007/01/04/simple-simulation-of-ms-dos-prompt/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 09:37:18 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2007/01/04/simple-simulation-of-ms-dos-prompt/</guid>
		<description><![CDATA[// very very simple indeed #include &#60;iostream&#62; #include &#60;stdlib.h&#62; #include &#60;string&#62; using namespace std ; void dir() ; void help() ; void prompt() ; void run() ; void thankyou() ; int main() { string input ; while(input != &#8220;exit&#8221;) { prompt() ; cin &#62;&#62; input ; if(input == &#8220;help&#8221;) help() ; if(input == &#8220;run&#8221;) run() [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=20&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>// very very simple indeed</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;string&gt;<br />
using namespace std ;</p>
<p>void dir() ;<br />
void help() ;<br />
void prompt() ;<br />
void run() ;<br />
void thankyou() ;</p>
<p>int main()<br />
{<br />
string input ;</p>
<p>while(input != &#8220;exit&#8221;)<br />
{<br />
prompt() ;<br />
cin &gt;&gt; input ;<br />
if(input == &#8220;help&#8221;) help() ;<br />
if(input == &#8220;run&#8221;) run() ;<br />
if(input == &#8220;dir&#8221;) dir() ;<br />
}</p>
<p>thankyou() ;</p>
<p>return 0 ;<br />
}</p>
<p>void prompt()<br />
{<br />
system(&#8220;cls&#8221;) ;<br />
cout &lt;&lt; &#8220;C:\\&#8221; ;<br />
}</p>
<p>void help()<br />
{<br />
cout &lt;&lt; &#8220;exit &#8211; quit the program&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;help &#8211; help menu&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;run  &#8211; run your program&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;dir  &#8211; display directory contents&#8221; &lt;&lt; endl ;<br />
system(&#8220;pause&#8221;) ;<br />
}</p>
<p>void thankyou()<br />
{<br />
cout &lt;&lt; &#8220;Thank You for Using&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;     JustinDOS&#8221; &lt;&lt; endl ;<br />
system(&#8220;pause&#8221;) ;<br />
}</p>
<p>void dir()<br />
{<br />
cout &lt;&lt; &#8220;Directory Contents&#8230;&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;hello.cpp  122 xxrxx &#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;bye.cpp     79 xxxrx &#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;NEW_FOLDER&#8221; &lt;&lt; endl ;<br />
cout &lt;&lt; &#8220;test.cpp   232 xrxxx &#8221; &lt;&lt; endl ;<br />
system(&#8220;pause&#8221;) ;<br />
}</p>
<p>void run()<br />
{<br />
cout &lt;&lt; &#8220;Your program will now run&#8230;&#8221; &lt;&lt; endl ;<br />
system(&#8220;pause&#8221;) ;<br />
for(int i = 1 ; i &lt;= 10 ; i++)<br />
{<br />
cout &lt;&lt; i ;<br />
if(i &lt; 10) cout &lt;&lt; &#8220;-&#8221; ;<br />
else cout &lt;&lt; endl ;<br />
}<br />
system(&#8220;pause&#8221;) ;<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=20&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2007/01/04/simple-simulation-of-ms-dos-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Be Consistent</title>
		<link>http://devipriya.wordpress.com/2007/01/04/be-consistent/</link>
		<comments>http://devipriya.wordpress.com/2007/01/04/be-consistent/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 09:34:37 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2007/01/04/be-consistent/</guid>
		<description><![CDATA[// BE CONSISTENT // DO THINGS THE SAME WAY EVERY TIME // (don't do something one way one time, and a // different way the next time) // use the following as an example only (pretend it's a bigger program) // BAD EXAMPLE....(notice the incrementation is done a different way each time even though it's [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=17&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- following code added by server. PLEASE REMOVE --><!-- preceding code added by server. PLEASE REMOVE --></p>
<pre>// BE CONSISTENT</pre>
<pre>// DO THINGS THE SAME WAY EVERY TIME</pre>
<pre>// (don't do something one way one time, and a</pre>
<pre>//  different way the next time)</pre>
<pre>// use the following as an example only (pretend it's a bigger program)</pre>
<pre> // BAD EXAMPLE....(notice the incrementation is done a different way each time even though it's doing the SAME THING!!!!)</pre>
<pre> #include   int main()</pre>
<pre>{      int mynumber = 0 ;</pre>
<pre>//      // other code...</pre>
<pre>//       mynumber = mynumber + 1 ;</pre>
<pre> cout &lt;&lt; "my number incremented by one is..." &lt;&lt; mynumber ;</pre>
<pre>   //      // other code...</pre>
<pre>  //       mynumber += 1 ;</pre>
<pre> cout &lt;&lt; "my number incremented by one again is..." &lt;&lt; mynumber ;</pre>
<pre>//      // other code...      //</pre>
<pre>mynumber++ ;</pre>
<pre> cout &lt;&lt; "my number incremented once more is..." &lt;&lt; mynumber ;</pre>
<pre> return 0 ;</pre>
<pre>}</pre>
<pre>// GOOD EXAMPLE.... (notice the incrementation is done the same way each time)</pre>
<pre> #include   int main()</pre>
<pre> {      int mynumber = 0 ;</pre>
<pre> //      // other code...      //</pre>
<pre> mynumber = mynumber + 1 ;</pre>
<pre> cout &lt;&lt; "my number incremented by one is..." &lt;&lt; mynumber ;</pre>
<pre>   //      // other code...      //</pre>
<pre> mynumber = mynumber + 1 ;</pre>
<pre>  cout &lt;&lt; "my number incremented by one again is..." &lt;&lt; mynumber ;</pre>
<pre>    //      // other code...      //</pre>
<pre>   mynumber = mynumber + 1 ;</pre>
<pre>   cout &lt;&lt; "my number incremented once more is..." &lt;&lt; mynumber ;</pre>
<pre> return 0 ;</pre>
<pre>}</pre>
<p><!-- text below generated by server. PLEASE REMOVE --><span></span>geovisit();<img border="0" src="http://visit.geocities.com/visit.gif?&amp;r=http%3A//www.geocities.com/neonprimetime.geo/cpp/cpp_Tips/TipsArchive.html&amp;b=Microsoft%20Internet%20Explorer%204.0%20%28compatible%3B%20MSIE%206.0%3B%20Windows%20NT%205.1%29%20%28+http%3A//www.googlebot.com/bot.html%3B%20MSIE%207.0%3B%20Windows%20NT%205.1%3B%20.NET%20CLR%201.1.4322%3B%20.NET%20CLR%202.0.50727%3B%20MEGAUPLOAD%201.0%29&amp;s=1280x800&amp;o=Win32&amp;c=32&amp;j=true&amp;v=1.2" /></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=17&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2007/01/04/be-consistent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>

		<media:content url="http://visit.geocities.com/visit.gif?&#38;r=http%3A//www.geocities.com/neonprimetime.geo/cpp/cpp_Tips/TipsArchive.html&#38;b=Microsoft%20Internet%20Explorer%204.0%20%28compatible%3B%20MSIE%206.0%3B%20Windows%20NT%205.1%29%20%28+http%3A//www.googlebot.com/bot.html%3B%20MSIE%207.0%3B%20Windows%20NT%205.1%3B%20.NET%20CLR%201.1.4322%3B%20.NET%20CLR%202.0.50727%3B%20MEGAUPLOAD%201.0%29&#38;s=1280x800&#38;o=Win32&#38;c=32&#38;j=true&#38;v=1.2" medium="image" />
	</item>
		<item>
		<title>Default in switches</title>
		<link>http://devipriya.wordpress.com/2006/12/26/default-in-switches/</link>
		<comments>http://devipriya.wordpress.com/2006/12/26/default-in-switches/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 10:44:43 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
		
		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/26/default-in-switches/</guid>
		<description><![CDATA[#include int main() {    int x = 17 ;    switch(x){        case 1:        case 5:        case 9:            cout &#60;&#60; &#8220;good job&#8221; &#60;&#60; endl;            break;        default:            // default catches anything else            // in this example any time x is            // not 1, 5, or 9            [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=16&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include </p>
<p>int main()<br />
{<br />
   int x = 17 ;<br />
   switch(x){<br />
       case 1:<br />
       case 5:<br />
       case 9:<br />
           cout &lt;&lt; &#8220;good job&#8221; &lt;&lt; endl;<br />
           break;<br />
       default:<br />
           // default catches anything else<br />
           // in this example any time x is<br />
           // not 1, 5, or 9<br />
           // default will catch it<br />
           // you don&#8217;t have to have a default<br />
           // but it&#8217;s usually helpful<br />
           // you also don&#8217;t have to break out of a default!<br />
           cout &lt;&lt; &#8220;Try again!&#8221; &lt;&lt; endl ;<br />
     }<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=16&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/26/default-in-switches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Consistent variable names</title>
		<link>http://devipriya.wordpress.com/2006/12/26/consistent-variable-names/</link>
		<comments>http://devipriya.wordpress.com/2006/12/26/consistent-variable-names/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 10:43:42 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
		
		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/26/consistent-variable-names/</guid>
		<description><![CDATA[int main(){ // I recommend using either this style for variable names // in which you capitalize each new word int theName ; int theOtherName ; int yetAnotherName ; // or using this style in which you put an underscore // between each new word int the_name; int the_other_name ; int yet_another_name ; // but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=15&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>int main(){      // I recommend using either this style for variable names      // in which you capitalize each new word      int theName ;      int theOtherName ;      int yetAnotherName ;       // or using this style in which you put an underscore      // between each new word      int the_name;       int the_other_name ;      int yet_another_name ;            // but just don't mix the two, please!      // DON'T MIX THEM PLEASE, pick either one style or the other      // BAD!      /*      int theName ;      int the_other_name ;      int yetAnother_name ;      */       return  0 ; }</pre>
<p><!-- text below generated by server. PLEASE REMOVE --></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=15&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/26/consistent-variable-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Program to reverse a Linked list within the same list</title>
		<link>http://devipriya.wordpress.com/2006/12/20/program-to-reverse-a-linked-list-within-the-same-list/</link>
		<comments>http://devipriya.wordpress.com/2006/12/20/program-to-reverse-a-linked-list-within-the-same-list/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 02:31:49 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
		
		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/20/program-to-reverse-a-linked-list-within-the-same-list/</guid>
		<description><![CDATA[#include typedef struct Link { int val; struct Link *next; } Link; /* Reverse List function */ Link *SL_reverse(Link *head) { Link *revlist = (Link *)0; while(head) { Link *tmp; tmp = head; head = head-&#62;next; tmp-&#62;next = revlist; revlist = tmp; } return revlist; } /* Supporting (Verification) routines */ Link *SL_build(); main() { [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=14&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include</p>
<p>typedef struct Link {<br />
int val;<br />
struct Link *next;<br />
} Link;</p>
<p>/* Reverse List function */<br />
Link *SL_reverse(Link *head)<br />
{<br />
Link *revlist = (Link *)0;</p>
<p>while(head) {<br />
Link *tmp;</p>
<p>tmp = head;<br />
head = head-&gt;next;<br />
tmp-&gt;next = revlist;<br />
revlist = tmp;<br />
}</p>
<p>return revlist;<br />
}</p>
<p>/* Supporting (Verification) routines */</p>
<p>Link *SL_build();</p>
<p>main()<br />
{<br />
Link *head;</p>
<p>head = SL_build();<br />
head = SL_reverse(head);</p>
<p>printf(&#8220;\nReversed List\n\n&#8221;);<br />
while(head) {<br />
printf(&#8220;%d &#8220;, head-&gt;val);<br />
head = head-&gt;next;<br />
}<br />
}<br />
Link *SL_build()<br />
{<br />
Link *head, *prev;</p>
<p>head = prev = (Link *)0;</p>
<p>while(1) {<br />
Link *new;<br />
int val;</p>
<p>printf(&#8220;Enter List element [ 0 for end ] : &#8220;);<br />
scanf(&#8220;%d&#8221;, &amp;val);<br />
if (val == 0) break;</p>
<p>new = (Link *) malloc(sizeof(Link));<br />
new-&gt;val = val;<br />
if (prev) prev-&gt;next = new;<br />
else head = new;<br />
prev = new;<br />
}</p>
<p>prev-&gt;next = (Link *)0;<br />
return head;<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=14&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/20/program-to-reverse-a-linked-list-within-the-same-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Algorithm to check if the link list is in Ascending order</title>
		<link>http://devipriya.wordpress.com/2006/12/20/algorithm-to-check-if-the-link-list-is-in-ascending-order/</link>
		<comments>http://devipriya.wordpress.com/2006/12/20/algorithm-to-check-if-the-link-list-is-in-ascending-order/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 02:31:13 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
		
		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/20/algorithm-to-check-if-the-link-list-is-in-ascending-order/</guid>
		<description><![CDATA[template bool linklist::isAscending() const{ nodeptr ptr = head; while(ptr-&#62;_next) { if(ptr-&#62;_data &#62; ptr-&#62;_next-&#62;_data) return false; ptr= ptr-&#62;_next; } return true; }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=13&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>template<br />
bool linklist::isAscending() const{<br />
nodeptr ptr = head;<br />
while(ptr-&gt;_next)<br />
{<br />
if(ptr-&gt;_data &gt; ptr-&gt;_next-&gt;_data)<br />
return false;</p>
<p>ptr= ptr-&gt;_next;<br />
}<br />
return true;<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=13&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/20/algorithm-to-check-if-the-link-list-is-in-ascending-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Why cant one make an object of abstract class?</title>
		<link>http://devipriya.wordpress.com/2006/12/20/why-cant-one-make-an-object-of-abstract-class/</link>
		<comments>http://devipriya.wordpress.com/2006/12/20/why-cant-one-make-an-object-of-abstract-class/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 02:28:45 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/20/why-cant-one-make-an-object-of-abstract-class/</guid>
		<description><![CDATA[we cant make object of abstract class because, in the vtable the vtable entry for the abstract class functions will be NULL, which ever are defined as pure virtual functions&#8230; even if there is a single pure virtual function in the class the class becomes as abstract class&#8230; if there is a virtual function in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=12&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="justify">we cant make object of abstract class because, in the vtable the vtable entry for the abstract class functions will be NULL, which ever are defined as pure virtual functions&#8230;</p>
<p align="justify">even if there is a single pure virtual function in the class the class becomes as abstract class&#8230;</p>
<p align="justify">if there is a virtual function in your class the compiler automatically creates a table called virtual function table&#8230; to store the virtual function addresses&#8230; if the function is a pure virtual function the vtable entry for that function will be NULL.</p>
<p align="justify">even if there is a single NULL entry in the function table the compiler does not allow to create the object&#8230;<br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=12&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/20/why-cant-one-make-an-object-of-abstract-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Difference between hard link and soft link in UNIX</title>
		<link>http://devipriya.wordpress.com/2006/12/20/difference-between-hard-link-and-soft-link-in-unix/</link>
		<comments>http://devipriya.wordpress.com/2006/12/20/difference-between-hard-link-and-soft-link-in-unix/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 02:26:53 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/20/difference-between-hard-link-and-soft-link-in-unix/</guid>
		<description><![CDATA[Hard Links : 1. All Links have same inode number. 2.ls -l command shows all the links with the link column(Second) shows No. of links. 3. Links have actual file contents 4.Removing any link ,just reduces the link count , but doesn&#8217;t affect other links. Soft Links(Symbolic Links) : 1.Links have different inode numbers. 2. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=11&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hard Links :</p>
<p>1. All Links have same inode number.</p>
<p>2.ls -l command shows all the links with the link column(Second) shows No. of links.</p>
<p>3. Links have actual file contents</p>
<p>4.Removing any link ,just reduces the link count , but doesn&#8217;t affect other links.</p>
<p>Soft Links(Symbolic Links) :</p>
<p>1.Links have different inode numbers.</p>
<p>2. ls -l command shows all links with second column value 1 and the link points to original file.</p>
<p>3. Link has the path for original file and not the contents.</p>
<p>4.Removing soft link doesn&#8217;t affect anything but removing original file ,the link becomes &#8220;dangling&#8221; link which points to nonexistant file.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=11&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/20/difference-between-hard-link-and-soft-link-in-unix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
		<item>
		<title>Short-hand form of communication.</title>
		<link>http://devipriya.wordpress.com/2006/12/18/short-hand-form-of-communication/</link>
		<comments>http://devipriya.wordpress.com/2006/12/18/short-hand-form-of-communication/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 07:42:20 +0000</pubDate>
		<dc:creator>devipriya</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://devipriya.wordpress.com/2006/12/18/short-hand-form-of-communication/</guid>
		<description><![CDATA[Many of my friends ask me what is BRB for the first time..If you do not interact online, chances are that you will not be knowing most of the terms like IMO, BTW, CU, OO etc. Well dont worry&#8230; You have dropped in the right place&#8230; Check this site that contains hundreds of such short [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=10&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="justify">Many of my friends ask me what is BRB for the first time..If you do not interact online, chances are that you will not be knowing most of the terms like IMO, BTW, CU, OO etc. Well dont worry&#8230; You have dropped in the right place&#8230; Check this site that contains hundreds of such short forms used in conversation as a sort of short-hand form of communication.</p>
<p><a href="http://www.computeruser.com/resources/dictionary/noframes/nf.chat.html"><font color="#666699">Short forms of communication</font></a></p>
<p>Here is some<br />
AKA = Also Known As<br />
ASAP = As Soon As Possible<br />
ASL = Age/Sex/Location<br />
BRB= Be Right Back<br />
CU = See You<br />
CUL8R = See You Later<br />
FYI = For Your Information<br />
IMHO = In My Humble Opinion<br />
IOW = In Other Words<br />
K = Ok<br />
LOL = laughing out loud<br />
MYOB = mind your own business<br />
RSVP = Repondez, s&#8217;il vous plait (Respond, please)<br />
W/O = without.&#8221; W/ means &#8220;with.&#8221;<br />
WTG = way to go</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/devipriya.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/devipriya.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devipriya.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devipriya.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devipriya.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devipriya.wordpress.com&amp;blog=608564&amp;post=10&amp;subd=devipriya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devipriya.wordpress.com/2006/12/18/short-hand-form-of-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f41710b7934e4611bcd90eb38691908a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">devipriya</media:title>
		</media:content>
	</item>
	</channel>
</rss>
