<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5567635208854255303</atom:id><lastBuildDate>Tue, 31 Mar 2026 00:14:30 +0000</lastBuildDate><category>C Language</category><category>C programs</category><category>C#</category><category>C# Console App. Programming</category><category>UNIX Shell Programs</category><category>Comuter Fundamental</category><category>Networking Q/A</category><category>Office Package</category><category>Oracle database security FAQ</category><category>System Analysis and Design (S.A.D)</category><title>Amit Ranjan : A Digital Marketer | Teacher | Artist from Sitamarhi</title><description>This website is all about programming Q/A of languages like C, C++, C#, etc. and is maintained by Amit Ranjan</description><link>http://amitcomputerknowledge.blogspot.com/</link><managingEditor>noreply@blogger.com (Amit Ranjan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>132</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-5087533501450754484</guid><pubDate>Wed, 16 Apr 2014 06:30:00 +0000</pubDate><atom:updated>2014-04-16T12:00:01.071+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program to Check Whether a Given String is Palindrome or Not</title><atom:summary type="text">
/* Write an Interactive C Program to Check Whether a Given String is Palindrome or Not, Using Pointer*/
main()
{
&amp;nbsp;char ch[20],a[20],*p;
&amp;nbsp;int i,len,c=0;
&amp;nbsp;clrscr();

&amp;nbsp;printf(&quot;Enter a string \(Word\).&quot;);
&amp;nbsp;gets(ch);
&amp;nbsp;len=strlen(ch);
&amp;nbsp;p=a;
&amp;nbsp;for(i=len-1;i&amp;gt;=0;i--)
&amp;nbsp;{
&amp;nbsp; *p=ch[i];
&amp;nbsp; p++;
&amp;nbsp;}
&amp;nbsp;for(i=0;i&amp;lt;len;i++)
&amp;nbsp;{
&amp;nbsp; if(ch[i]=</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/04/program-to-check-whether-given-string.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHTWSkeMRSwZKP9u7slaBVRA0x8AhtNpHqOURvnSVA8rCsZRKXdvTuEsfXiAfeyHR7Fpkoq7zKedGIzPPipQW64Qu93uPuKTlt0qbwRH065nvXCn_Z-mxwBck6QR6Hny_md1PZiLFEei0/s72-c/String+Palindrome.JPG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Patna, Bihar, India</georss:featurename><georss:point>25.61046 85.141666999999984</georss:point><georss:box>25.61046 85.141666999999984 25.61046 85.141666999999984</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-4813741089068281577</guid><pubDate>Wed, 16 Apr 2014 04:00:00 +0000</pubDate><atom:updated>2018-11-02T18:22:41.055+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program to Replace a Character in a String.</title><atom:summary type="text">/*Write a function strreplace(s,chr,repl_chr) which will replace each occurrences of character chr with the character repl_chr in the string s. The function returns the number of replacements.*/

int strreplace(char [],char,char);
main()
{
&amp;nbsp;char s[160],c,r;
&amp;nbsp;int i;
&amp;nbsp;clrscr();
&amp;nbsp;printf(&quot;Enter any string \(word or sentence\).\n&quot;);

&amp;nbsp;gets(s);
&amp;nbsp;printf(&quot;\nYou enter the </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/04/program-to-replace-character-in-string.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijarHA4fruPRX5VHyqPOBEOeb5Lgz4a7FkNJ4vKtLpL7LGgQmJ7QkeQnj7LQvoCmksSCPt2S72fkNj3lTgZiQBftYJ3LMGsRxaJkJ60PsTtLbcwsEu0712GIi0TgQzfAX4WC_cUhiCckw/s72-c/String+Char+Replacement+Output.JPG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Patna, Bihar, India</georss:featurename><georss:point>25.61046 85.141666999999984</georss:point><georss:box>25.61046 85.141666999999984 25.61046 85.141666999999984</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-9182423038914296378</guid><pubDate>Wed, 16 Apr 2014 02:19:00 +0000</pubDate><atom:updated>2014-04-16T14:57:51.886+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program to Convert a Binary Number to Its Octal Equivalent.</title><atom:summary type="text">
main()
{
&amp;nbsp;int bin[16],i,oct[16],s,os,j,x,r;
&amp;nbsp;clrscr();
&amp;nbsp;printf(&quot;Enter the number of bits you want to insert. --&amp;gt; &quot;);

&amp;nbsp;scanf(&quot;%d&quot;,&amp;amp;s);


&amp;nbsp;printf(&quot;Enter Binary number with space between each bit.\n&quot;);
&amp;nbsp;for(i=0;i&amp;lt;s;i++)
&amp;nbsp;{
&amp;nbsp; scanf(&quot;%d&quot;,&amp;amp;bin[i]);
&amp;nbsp; if(bin[i]&amp;gt;1)
&amp;nbsp; {
&amp;nbsp; &amp;nbsp;printf(&quot;\nThis is not a binary number.&quot;);
&amp;nbsp; &amp;nbsp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/04/program-to-convert-binary-number-to-its.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP6Xd1iov3dRi6yheI8ae7fJvDIChuQMjUbWyppfjrGqK-wP-pQfcemfewIka5mIr5g_sPMayKZ4DEDUkT0IZHLMgW5RRfMEZOAjTYjnyfW8EHmAyuDjrSG0-WSBGQcLSzI4hTvLgjR0k/s72-c/flowchart+of+Binary+To+Octal.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Patna, Bihar, India</georss:featurename><georss:point>25.61046 85.141666999999984</georss:point><georss:box>25.4959095 84.980305499999986 25.7250105 85.303028499999982</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-7862770684099082611</guid><pubDate>Sat, 29 Mar 2014 12:46:00 +0000</pubDate><atom:updated>2014-03-29T18:24:30.380+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program To Calculate and Report the Owed Income Tax Amount</title><atom:summary type="text">
/* Assume that the United States of America uses the following income tax code formula for their annual income:
First US$ 5,000 of income: 0% tax
Next US$ 10,000 of income: 10% tax
Next US$ 20,000 of income: 15% tax
Next &amp;nbsp;Amount upto and above US$ 35,000: 20% tax.
For example, somebody earning US$ 38,000 annually would owe

US$ 5,000 X 0.00&amp;nbsp;+ 10,000 X 0.10&amp;nbsp;+ 20,000 X 0.15&amp;nbsp;+ </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/03/program-to-calculate-and-report-owed.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqvVDDiL8LAy8NzirPawZ5TmdAgzWEJMLUA2P3RB6sxTKayVQ3H6A0go8nROphFYWeDM6wQCureWwHl7-gkYG_k3q4PKtSXCsb1uO4M9egWROhZOwYM1YBXxJULNSX3jgjVuI75BOJkpw/s72-c/US+Income+Tax.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-5657698166381578809</guid><pubDate>Sat, 29 Mar 2014 11:30:00 +0000</pubDate><atom:updated>2014-03-29T18:22:41.562+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program To Check Whether Given Two Numbers Are Amicable Numbers or Not</title><atom:summary type="text">
/*Amicable Numbers are two numbers so related that the sum of the proper divisors of the one is equal to the other, unity being considered as a proper divisor but not the number itself. Such a pair is (220, 284).*/


main()
{
&amp;nbsp;int num1, num2, i, t1=0,t2=0;
&amp;nbsp;clrscr();
&amp;nbsp;printf(&quot;Enter two numbers to check whether they are amicable numbers or not. --&amp;gt; &quot;);
&amp;nbsp;scanf(&quot;%d%d&quot;,&amp;amp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/03/program-to-check-whether-given-two.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNKP7QtJVv5o9qzk-wvTCLu05v373OPfVheMBDQin64Kdt2net_XLxWxeX_KD3IjvUUHVuUCeFFuSX8HMcS8asMlHqhaeN-FNjsO8VllQIFU6Ssra0LkJPktaHjcnzr3eAwCfjmGlNxY/s72-c/Amicable+true.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-2034015954815445432</guid><pubDate>Mon, 20 Jan 2014 13:35:00 +0000</pubDate><atom:updated>2014-01-27T19:04:40.797+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Office Package</category><title>How to Embed a Youtube Video In PowerPoint 2010 </title><atom:summary type="text">When one of my friend was preparing a presentation then he faced a problem to embed youtube video to his Slide. He asked me that if I know how to do that. But at that time I was also not aware of that particular method of embedding which I am going to share with all of you. I hope this will help you in your presentation work. Best of LUCK.
</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2014/01/how-to-embed-youtube-video-in.html</link><author>noreply@blogger.com (Amit Ranjan)</author><thr:total>0</thr:total><georss:featurename>Patna, Bihar, India</georss:featurename><georss:point>25.61046 85.141666999999984</georss:point><georss:box>25.4959095 84.980305499999986 25.7250105 85.303028499999982</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-3944733729966555588</guid><pubDate>Mon, 25 Feb 2013 07:55:00 +0000</pubDate><atom:updated>2014-01-27T18:59:01.951+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C programs</category><title>Program to take any number from 1 to 999 and display its name.</title><atom:summary type="text">
main()
{
&amp;nbsp;int num,number;
&amp;nbsp;char ch;
&amp;nbsp;while(1)
&amp;nbsp;{
&amp;nbsp;clrscr();
&amp;nbsp;printf(&quot;\nEnter any number between 0 to 1000 :-\nNumber = &quot;);

&amp;nbsp;scanf(&quot;%d&quot;,&amp;amp;number);
&amp;nbsp;num=number;
&amp;nbsp;z: if(num&amp;lt;=10 &amp;amp;&amp;amp; num&amp;gt;0)
&amp;nbsp;{
&amp;nbsp; if(num==1) &amp;nbsp;printf(&quot;One&quot;); &amp;nbsp;if(num==2) &amp;nbsp;printf(&quot;Two&quot;);
&amp;nbsp; if(num==3) &amp;nbsp;printf(&quot;Three&quot;); &amp;nbsp;if(num==4) &amp;nbsp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2013/02/program-to-take-any-number-from-1-to.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho-pzPJ3ZLlI2FD54JWG_ExMivM7xqDm9QW45cvBAb2QURSJKJCeJoavloT2WNDINyE-eY0adMBMsjgqjKvNmf3fjfvc4L1Io9vnTUOOXfcwjgAiBB1ivk_I-uaMoEtW4OO6Zv7wyOe18/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-2221650710783166134</guid><pubDate>Wed, 07 Nov 2012 04:44:00 +0000</pubDate><atom:updated>2014-01-27T18:59:14.875+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to illustrate the application of Multicast delegates</title><atom:summary type="text">
using System;
delegate void MDelegate();
class DM
{
&amp;nbsp;static public void Display()

&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;New Delhi&quot;);
&amp;nbsp;}
&amp;nbsp;public static void Print()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;New York&quot;);
&amp;nbsp;}
}
class MTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; MDelegate m1 = new MDelegate(DM.Display);
&amp;nbsp; MDelegate m2 = new MDelegate(DM.Print);
&amp;nbsp; MDelegate m3 = </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-illustrate-application-of.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS87R5MMWYuUWIn3-cVAxf1LIMMdB3uJxzigeS-3l5zP39ZwU7nh-4gxKPRgTS8gMpqcjOA8tPU7HBSRFQMss5vc-TiilIVBd3BOVZaoMhaa8ovlL7kGWZJBBnnsu4V5OMwuwy7WKXctA/s72-c/Capture16.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-1974132888082977652</guid><pubDate>Wed, 07 Nov 2012 04:42:00 +0000</pubDate><atom:updated>2014-01-27T19:07:38.531+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to illustrate how an array of delegate object is created and used in a program (Singlecast delegate)</title><atom:summary type="text">
using System;
delegate int ArithOp(int x,int y);
class MathOperation
{
&amp;nbsp;public static int Add(int a,int b)
&amp;nbsp;{
&amp;nbsp; return a+b;
&amp;nbsp;}
&amp;nbsp;static public int Sub(int a,int b)
&amp;nbsp;{
&amp;nbsp; return a-b;
&amp;nbsp;}
}
class DelegateTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; ArithOp[] Op = { new ArithOp(MathOperation.Add),
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-illustrate-how-array-of.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYu24893uYuLZmcmDo5TCCiJxhyphenhyphen6R0Z5PAhNBT2LBKyQ4rcVYSS0y8VLcCwbGB3AlpWv1wdE87S0lq5SDHDrty0qdvxvGnvxfK2r-O_Kyx0F5R6p6o080CZfJqpaygP_QHmDFvKPiofBE/s72-c/Capture15.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-3022181289892311533</guid><pubDate>Wed, 07 Nov 2012 04:38:00 +0000</pubDate><atom:updated>2014-01-29T19:43:54.584+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to illustrate how a delegate is created and used in a program (Single-cast delegate)</title><atom:summary type="text">
using System;
delegate int ArithOp(int x,int y);
class MathOperation
{
&amp;nbsp;public static int Add(int a,int b)
&amp;nbsp;{
&amp;nbsp; return a+b;
&amp;nbsp;}
&amp;nbsp;static public int Sub(int a,int b)
&amp;nbsp;{
&amp;nbsp; return a-b;
&amp;nbsp;}
}
class DelegateTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; ArithOp AddOp = new ArithOp(MathOperation.Add);
&amp;nbsp; ArithOp SubOp = new ArithOp(MathOperation.Sub);
&amp;nbsp; </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-illustrate-how-delegate-is.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjccbOXrp0Atyvci5sr7xi1I6JNk72bAJ9wZW1yrBVteQV5Boo-8GeXYhleWVCNMD7DVz01gjtt9Kp1lbcWM3bho3AzmkGRduy387VpqReE8kksxwu5aRXwT-0T3NkUMroLLSqF5iqqRkY/s72-c/Capture14.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-7238997185376741723</guid><pubDate>Mon, 05 Nov 2012 15:14:00 +0000</pubDate><atom:updated>2014-01-29T19:43:42.928+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Another program to illustrate the use of explicit interface implementation</title><atom:summary type="text">
using System;
class ExplicitInterface
{
&amp;nbsp;interface readFile
&amp;nbsp;{
&amp;nbsp; void Read();
&amp;nbsp; void Write();
&amp;nbsp;}
&amp;nbsp;interface writeFile
&amp;nbsp;{
&amp;nbsp; void View();
&amp;nbsp; void Read();
&amp;nbsp;}
&amp;nbsp;public class Document : readFile , writeFile
&amp;nbsp;{
&amp;nbsp; public Document(string doc)
&amp;nbsp; {
&amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;Creating a document with : &quot;+doc);
&amp;nbsp; }
&amp;nbsp; public </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/another-program-to-illustrate-use-of.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5hBVLh4VNPJmptNcd9usFScfTYrUllctU_ec1HJTAQMy8txqeNgL9d623g34SEF2TxGtnZSc9rRqJqopnTGHe4NEAqq_hprKEW7-nareeyhvRV3BWSSwnJEMT87SUGwuxjeK47rr-tTM/s72-c/Capture12.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-6064604119595857647</guid><pubDate>Mon, 05 Nov 2012 15:13:00 +0000</pubDate><atom:updated>2014-01-29T19:44:06.493+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to show the inheritance using abstract class</title><atom:summary type="text">
using System;
class Program
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; ABS[] aArray = new ABS[3];
&amp;nbsp; aArray[0] = new Class1(1,2,&quot;This is the first value in array&quot;);
&amp;nbsp; aArray[1] = new Class1(3,4,&quot;This is the next value in array&quot;);
&amp;nbsp; aArray[2] = new Class2(5,6);
&amp;nbsp; for(int i=0;i&amp;lt;3;aArray[i].Show(),i++);
&amp;nbsp; Console.ReadKey();
&amp;nbsp;}
}
public abstract class ABS
{
&amp;nbsp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-show-inheritance-using.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinutB63vM1x9NN1xEbG6W2LoJcPX5XQ_TNaaNzZnJvgQDVy6zZ16xFuD8y9cYlKWz60Pfrss6lrUi6dr1ngindlWfDFuZjNCvJvlHumaSox2JdkIgxDiRPScw3eHwPEuQD85HfVxcMkeI/s72-c/Capture13.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-753538750956776617</guid><pubDate>Mon, 05 Nov 2012 14:58:00 +0000</pubDate><atom:updated>2014-01-29T19:43:31.059+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to illustrate the use of explicit interface implementation</title><atom:summary type="text">
using System;
interface I1
{
&amp;nbsp;void Display();
}
interface I2
{
&amp;nbsp;void Display();
}
class C : I1 , I2
{
&amp;nbsp;void I1.Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;I1 Display Method called  .&quot;);
&amp;nbsp;}
&amp;nbsp;void I2.Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;I2 Display Method called  .&quot;);
&amp;nbsp;}
}
class InterfaceTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; C c = new C();
&amp;nbsp; I1 i1 </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-illustrate-use-of-explicit.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCNBawYFERilwe2_d5kNf8IsfCWyLs0bgsOICJ2oieIxz_X1oLUIwMg95RNOVHlOboDIwJfBJ7-dK0VxeIePOCihF_2ZltS7kbTlh-ysxW2J-2TpR2DrD9IjxkRu37c8qfcPyNUrdzrtY/s72-c/Capture11.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-8412507616158186006</guid><pubDate>Mon, 05 Nov 2012 14:54:00 +0000</pubDate><atom:updated>2014-01-29T19:43:12.333+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program for inheriting a class that implements an interface</title><atom:summary type="text">
using System;
interface Display
{
&amp;nbsp;void Print();
}
class B : Display
{
&amp;nbsp;public void Print()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Base Display.  &quot;);
&amp;nbsp;}
}
class D : B
{
&amp;nbsp;public new void Print()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Derived Display.  &quot;);
&amp;nbsp;}
}
class InterfaceTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; D d=new D();
&amp;nbsp; d.Print();
&amp;nbsp; Display dis = (Display)</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-for-inheriting-class-that.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMfBD8S6bsTTS3XE1hhGg21efGYc5RZJA_0QxU05NrmprimIqvJm51UGQEnQfCSIKEybVjq8n4wPRwlX4P1WvBlyRa8fR-4hmIger9m4N_WTTW2twJgfU7vcKBIkISSFF-Kw3vFaCJZsg/s72-c/Capture10.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-7966895347446341369</guid><pubDate>Mon, 05 Nov 2012 14:50:00 +0000</pubDate><atom:updated>2014-01-29T19:43:07.096+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program for multiple implimentation of an interface</title><atom:summary type="text">
using System;
interface Area
{
&amp;nbsp;double Compute(double x);
}
class Square : Area
{
&amp;nbsp;public double Compute(double x){ return x*x; }
}
class Circle : Area
{
&amp;nbsp;public double Compute(double x){ return Math.PI*x*x; }
}
class InterfaceTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; Square sqr=new Square();
&amp;nbsp; Circle cir=new Circle();
&amp;nbsp; Area area;
&amp;nbsp; area= sqr as Area;
&amp;nbsp; </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-for-multiple-implimentation-of.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHiYMSnkmjtaCqV8IfzAarHUn12aCwahIRmtFPsh36bCMCa6PrONGsVyVu_N4k0GzgdH-wV-i248gnhUI6bVqCTe2yFfHlYRQHetMCP2mNlSK-lEhZGDcNFB4Mbez9EeU2yXEYu9q3V9s/s72-c/Capture9.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-3003822528268649084</guid><pubDate>Mon, 05 Nov 2012 14:44:00 +0000</pubDate><atom:updated>2014-01-29T19:42:49.062+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program for Implementation of multiple interface</title><atom:summary type="text">
using System;
interface Addition { int Add(); }
interface Multiplication { int Mul(); }
class Computation : Addition , Multiplication
{
&amp;nbsp;int x,y;
&amp;nbsp;public Computation(int x,int y)
&amp;nbsp;{
&amp;nbsp; this.x = x;
&amp;nbsp; this.y = y;
&amp;nbsp;}
&amp;nbsp;public int Add() { &amp;nbsp;return x+y; &amp;nbsp;}
&amp;nbsp;public int Mul() { &amp;nbsp;return x*y; &amp;nbsp;}
}
class InterfaceTest
{
&amp;nbsp;static void Main()
&amp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-for-implementation-of-multiple.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDqyHdfgTXLNw7eKv8YPgiuMhPaVszW3v9UyM1BuBJ6Fmogx2pJ9uZJE4w0g6Mj6WmlAsnPzAzxs7BQS2SUhRj2emOvpUu7fDLjvgouc_hQv2KKCsGbsLHU-780HhEl3wrNgVQMaQ5oWg/s72-c/Capture8.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-105180809730538689</guid><pubDate>Sun, 04 Nov 2012 12:20:00 +0000</pubDate><atom:updated>2014-01-29T19:42:21.638+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to implementing a property in C sharp.</title><atom:summary type="text">
using System;
class Number
{
&amp;nbsp;int number;
&amp;nbsp;public int Anumber
&amp;nbsp;{
&amp;nbsp; get
&amp;nbsp; {
&amp;nbsp; &amp;nbsp;return number;
&amp;nbsp; }
&amp;nbsp; set
&amp;nbsp; {
&amp;nbsp; &amp;nbsp;number=value;
&amp;nbsp; }
&amp;nbsp;}
}
class PropertyTest
{
&amp;nbsp;static void Main()
&amp;nbsp;{
&amp;nbsp; Number n = new Number();
&amp;nbsp; n.Anumber=100;
&amp;nbsp; int m=n.Anumber;
&amp;nbsp; Console.WriteLine(&quot;m = &quot;+m);
&amp;nbsp;}
}
-----------------</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-implementing-property-in-c.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgiweryrOYLBi2t10rkPgDwWkkAh8MhJAIMe-m1B-Nz-R_IK3thPbJsGnQ-fTx1BRSWjL3f5x2hXLsthWGEsyKPYKD5TIFdc2jm7SgGIGWGfPiEgeskHuq2ZH67eS-CaJfMV8iD_ZfL4/s72-c/Capture7.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-7778609061926718985</guid><pubDate>Sun, 04 Nov 2012 12:15:00 +0000</pubDate><atom:updated>2014-01-29T19:42:15.935+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to show the upcasting of an object of Derived class to an object of its base class</title><atom:summary type="text">
using System;
class Maruti
{
&amp;nbsp;public virtual void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Maruti Car.&quot;);
&amp;nbsp;}
}
class Esteem : Maruti
{
&amp;nbsp;public override void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Maruti Esteem.&quot;);
&amp;nbsp;}
}
class Zen : Maruti
{
&amp;nbsp;public override void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Maruti Zen.&quot;);
&amp;nbsp;}
}
class Inclusion
{
&amp;nbsp;static </atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-show-upcasting-of-object-of.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR9TOa9xvEfAcOY2gxzwa7bcQqWpC34Xeuru50-BK__9g3fGy1HOBabVxtaqjuX65pKU7AAHGhEcEPZAw1Xj_64enYgRKT2iWQk0rUcuoFGlPNsI_Hih_HgiSZpqdSC0dDYPsc1dxDOdo/s72-c/Capture6.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-6838503175491267959</guid><pubDate>Sun, 04 Nov 2012 08:07:00 +0000</pubDate><atom:updated>2014-01-29T19:42:11.443+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program of hierarchical inheritance and function overriding</title><atom:summary type="text">
using System;
class BaseClass
{
&amp;nbsp;public int num1,num2,num3;
&amp;nbsp;public virtual int function1()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Base class : function1() returning 1 called.&quot;);
&amp;nbsp; return 1;
&amp;nbsp;}
&amp;nbsp;public virtual int function2()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Base class : function2() returning 2 called.&quot;);
&amp;nbsp; return 2;
&amp;nbsp;}
&amp;nbsp;public virtual int function3()
&amp;nbsp;{
</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-of-hierarchical-inheritance-and.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD1792VKID6L7J9JnsMjKhEZRC73d7YSuWPrDTap1y2Ba3R_r9REEB0UBLOhKpoDefg4yfDoGwr1izMj12hnN_UXZpAt0Xs8mscnqmXDbxArvP5N3v144npUsuRYzUJlm39PS8Uq9_oEg/s72-c/Capture4.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-552322114310064185</guid><pubDate>Sun, 04 Nov 2012 08:02:00 +0000</pubDate><atom:updated>2014-01-29T19:41:49.622+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to show the use of sealed keyword on methods in inheritance and overriding</title><atom:summary type="text">
using System;
class GrandParent
{
&amp;nbsp;private string clname;
&amp;nbsp;public GrandParent(){}
&amp;nbsp;public GrandParent(string s)
&amp;nbsp;{
&amp;nbsp; clname = s;
&amp;nbsp;}
&amp;nbsp;public virtual void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;GrandParent Class Display Method called by &quot;+clname+&quot;\&#39;s object&quot;);
&amp;nbsp;}
}
class Parent : GrandParent
{
&amp;nbsp;private string clname;
&amp;nbsp;public Parent(){}
&amp;nbsp;</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-show-use-of-sealed-keyword_4.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFEa26rhJCdWJR8y5kJWD4CZvCFvFHPX6brU8UqOBz_rHlkkA5RALMwGYgdAQMycAeK5CBDdML9317Mq4W4D4jdxfGM0GBbO63-Pzg2UmWj5LkVSqE9EIHuQk1yl0YHTOs8AOhdTpCTWQ/s72-c/Capture3.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-4735862471236125899</guid><pubDate>Sun, 04 Nov 2012 07:57:00 +0000</pubDate><atom:updated>2014-01-29T19:41:41.405+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to show the use of sealed keyword for class in inheritance and overriding</title><atom:summary type="text">
using System;
sealed class GrandParent
{
&amp;nbsp;public void Show()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;GrandParent Class Method&quot;);
&amp;nbsp;}
}
class Parent // :GrandParent &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Error; &#39;Parent&#39; cannot derive from sealed type class &#39;GrandParent&#39;
{
&amp;nbsp;public virtual void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Parent Class Method&quot;);
&amp;nbsp;}
}
sealed class Child : Parent
{
</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-show-use-of-sealed-keyword.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnyYoItutWyVKMmXAQhiKlR3cnkQHjCIVBVErW1D8ls8pi82PUte4J1pJkBJIlOT1c8aBuQm3_OeAwAsJCvvjcpQYJP9XN5GAn9NO0Jo36AVoD7mCf_-fnzBFZUO3JG5EDOKbTsiJQwNw/s72-c/Capture2.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-6561327168752025256</guid><pubDate>Sun, 04 Nov 2012 07:50:00 +0000</pubDate><atom:updated>2014-01-29T19:41:29.594+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to show the use of abstract keyword in Inheritance</title><atom:summary type="text">
using System;
abstract class Base
{
&amp;nbsp;public Base()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Welcome in Base Class&quot;);
&amp;nbsp;}
&amp;nbsp;public void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;It&#39;s a normal method in abstract class&quot;);
&amp;nbsp;}
&amp;nbsp;public abstract void Sum(int x,int y);
}
class Derived : Base
{
&amp;nbsp;public Derived()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Welcome in Derived Class&quot;);
&amp;nbsp;}
</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-show-use-of-abstract-keyword.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiss1xpllTDO8ZnW2FpTsb5A65FR3RQ70WnzHe07zoaI0TSBZDRuhaUF_P9qF_WY_5FN5Jg2D8joRFBK0cf-dOA5_2hqraHHQh1zOlX43i7siaWz7Hzw-eRpUMkoAzQpfbaVnu0o3Vv1pM/s72-c/Capture1.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-1745107740092822391</guid><pubDate>Sun, 04 Nov 2012 07:45:00 +0000</pubDate><atom:updated>2014-01-29T19:40:53.051+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>Program to demonstrate the use of virtual and override keyword</title><atom:summary type="text">
using System;
class GrandParent
{
&amp;nbsp;public virtual void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;GrandParent Class Method&quot;);
&amp;nbsp;}
}
class Parent : GrandParent
{
&amp;nbsp;public override void Display()
&amp;nbsp;{
&amp;nbsp; Console.WriteLine(&quot;Parent Class Method&quot;);
&amp;nbsp;}
}
class Child : Parent
{
&amp;nbsp; public override void Display()
&amp;nbsp; {
&amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;Child Class Method&quot;);</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/11/program-to-demonstrate-use-of-virtual.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8jQ99H9_lMqlPyylMwRH1iiU4rZAjrp2qVz9yzCSvAAknK5P1VzEfUStDjMz9L6n6dP5ZzQ4XwxQXvYlkw7wZXJksZkJz0_-dgdF1c-ptP73Kp5hDxICXJrMx1t8zstO9sMQ9dsAjDSs/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-7782540481101060522</guid><pubDate>Wed, 31 Oct 2012 05:41:00 +0000</pubDate><atom:updated>2014-01-29T19:40:20.894+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>How to Compile the C-sharp programs through normal command prompt (cmd.exe) other than visual studio command prompt?</title><atom:summary type="text">
First of all open run window and type cmd and then press &#39;enter&#39; or click &#39;ok&#39; button. Then go to the folder or make a folder where you want to create and compile .cs file (C-Sharp source code).
For example:-
c:\Users\Administrator&amp;gt;d:
d:\&amp;gt;md C#Folder
d:\&amp;gt;cd C#Folder
d:\C#Folder&amp;gt;


Now create a batch file with the name CSCompiler.bat by writing the any one of the following commands
d:</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/10/how-to-compile-c-sharp-programs-through.html</link><author>noreply@blogger.com (Amit Ranjan)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5567635208854255303.post-14199634951098916</guid><pubDate>Tue, 23 Oct 2012 02:48:00 +0000</pubDate><atom:updated>2014-01-29T19:40:05.124+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C# Console App. Programming</category><title>The length &amp; breadth of a rectangle and radius of a circle are input through  the keyboard. Write a program to calculate the area &amp; perimeter of the rectangle, and the area &amp; circumference of the circle.</title><atom:summary type="text">
using System;
class Program5
{
&amp;nbsp;public static void Main()
&amp;nbsp;{
&amp;nbsp; double l,b,r,A_r,P_r,A_c,C_c;
&amp;nbsp;Console.Write(&quot;Enter length and breadth of a rectangle in cm\n&quot;);
&amp;nbsp;l=Convert.ToDouble(Console.ReadLine());
&amp;nbsp;b=Convert.ToDouble(Console.ReadLine());
&amp;nbsp;A_r=l*b;
&amp;nbsp;P_r=2*(l+b);
&amp;nbsp;Console.Write(&quot;Area of rectangle = {0} sq.cm\nPerimeter of rectangle = {1} cm\n&quot;,A_r,</atom:summary><link>http://amitcomputerknowledge.blogspot.com/2012/10/the-length-breadth-of-rectangle-and.html</link><author>noreply@blogger.com (Amit Ranjan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH2g0tfFqOLbnPR_IU-O43vFuLnirychGhZtJV-KYhIcY5C8wWD0bXy8cPrwCjr1PJjy37lmNMYYc9E8u-UG0dCX46viaiM7wSeERJPaKgp9ktQsW9N-bJFn14tkpOw5VESm1xTVhi3oE/s72-c/Capture1.PNG" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>