<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>free | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/free/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Fri, 19 Aug 2011 14:58:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>What is the difference between new and malloc?</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-faq/difference-malloc/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-faq/difference-malloc/#comments</comments>
		
		<dc:creator><![CDATA[Chitra]]></dc:creator>
		<pubDate>Fri, 19 Aug 2011 09:29:06 +0000</pubDate>
				<category><![CDATA[C Questions & Answers]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[destructor]]></category>
		<category><![CDATA[operator ++]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[malloc]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[exception]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1648</guid>

					<description><![CDATA[<p>Here are the differences between new and malloc, Operator new constructs an object (calls constructor of object), malloc does not. Hence new invokes the constructor (and delete invokes the destructor)This is the most important difference. operator new is an operator, malloc is a function. operator new can be overloaded, malloc cannot be overloaded. operator new</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/difference-malloc/">What is the difference between new and malloc?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Here are the differences between new and malloc,</p>
<ol>
<li>Operator new constructs an object (calls constructor of object), malloc does not. Hence new invokes the constructor (and delete invokes the destructor)This is the most important difference.</li>
<li>operator new is an operator, malloc is a function.</li>
<li>operator new can be overloaded, malloc cannot be overloaded.</li>
<li>operator new throws an exception if there is not enough memory, malloc returns a NULL.</li>
<li>operator new[] requires you to specify the number of objects to allocate, malloc requires you to specify the total number of bytes to allocate.</li>
<li>operator new/new[] must be matched with operator delete/delete[] to deallocate memory, malloc() must be matched with free() to deallocate memory.</li>
</ol>
<p><strong>Syntax of new is:</strong><br />
p_var = new type name;<br />
Where p_var is a previously declared pointer of type typename. And typename can be any basic data type.</p>
<p><strong>Example:</strong><br />
int  *p;<br />
p = new int;<br />
It allocates memory space for an integer variable.</p>
<p><strong>Syntax of malloc is:</strong><br />
p_var = (typename *)malloc(sizeof(typename));<br />
Where p_var is a previously declared pointer of type typename. And typename can be any basic data type.<br />
<strong></strong></p>
<p><strong>Example:<br />
</strong>int *p;<br />
p = (int *)malloc(sizeof(int));<br />
This statement &#8220;allocates&#8221; or &#8220;reserves&#8221; a block of memory for an integer from the heap. Then it places the address of the reserved block into the pointer variable (p, in this case).</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/difference-malloc/">What is the difference between new and malloc?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-faq/difference-malloc/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>C program to Implement Morse code to text conversion and vice-versa.</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-to-implement-morse-code-to-text-conversion-and-vice-versa/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-to-implement-morse-code-to-text-conversion-and-vice-versa/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Apr 2010 15:52:44 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Morse code]]></category>
		<category><![CDATA[text conversion]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1146</guid>

					<description><![CDATA[<p>C program to Implement Morse code to text conversion and vice-versa. #include #include #include #include void main() { char str[25],str1[100]; clrscr(); fflush(stdin); printf("enter the String"); gets(str); int j=0; for(int i=0;i</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-to-implement-morse-code-to-text-conversion-and-vice-versa/">C program to Implement Morse code to text conversion and vice-versa.</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C program to Implement Morse code to text conversion and vice-versa.</p>
<pre lang="c">
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<process.h>

void main()
{
	char str[25],str1[100];
	clrscr();
	fflush(stdin);
	printf("enter the String");
	gets(str);

	int j=0;
	for(int i=0;i<=strlen(str);++)
	{
		switch(toupper(str[i]))
		{
		  case 'A':
		  str1[j++]='.';
		  str1[j]='.';
		  break;
		  
		  case 'b':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		  break;

		  case 'c':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		  break;

		  case 'D':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		  break;

		  case 'E':
		  str1[j]='.';
		  break;

		  case 'F':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		  case 'G':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		  break;

		  case 'H':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		   case 'I':
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'J':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'K':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'L':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		  break;

		case 'M':
		  str1[j++]='-';
		    str1[j]='-';
		    break;

		case 'N':
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case 'O':
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case 'P':
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case 'Q':
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'R':
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case 'S':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'T':
		  str1[j]='-';
		    break;
			
		case 'U':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'V':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case 'W':
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j]='-';
		    break;

		case 'X':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case 'y':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case 'Z':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case '0':
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='-';
		    break;
			
		case '1':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-'; 
		  str1[j]='-';
		    break;

		case '2':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case 'F':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case '3':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case '4':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '5':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='.';
		    break;

		case '6':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '7':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '8':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '9':
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case '.':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case ',':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case ':':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '?':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		/* case '\';
		  str1[j++]='.';
		  str1[j++]='.'; 
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break; */

		case '-':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case ';':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case '(':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case ')':
		  str1[j++]='.';
		  str1[j++]='.'; 
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case ']':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='-';
		    break;

		case '[':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j]='.';
		    break;

		case '}':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j]='-';
		    break;
			
		case '{':
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j++]='-';
		  str1[j++]='-';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '"':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '+':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '/':
		  str1[j++]='.';
		  str1[j++]='.';  
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '%':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '&#038;':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '$':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '*':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '^':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '#':
		  str1[j++]='.';
		  str1[j++]='.';  
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '@':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='-';
		    break;

		case '=':
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j++]='.';
		  str1[j]='';
		    break;
		}
	    j++;
	}
	str1[j-1]='\0';
	puts(str1);
	getch();
 }
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-to-implement-morse-code-to-text-conversion-and-vice-versa/">C program to Implement Morse code to text conversion and vice-versa.</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-to-implement-morse-code-to-text-conversion-and-vice-versa/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>C++ program to calculate the factorial of a number using recursion.</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-program-to-calculate-the-factorial-of-a-number-using-recursion/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-program-to-calculate-the-factorial-of-a-number-using-recursion/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Apr 2010 12:56:18 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[calculate factorial]]></category>
		<category><![CDATA[c programs]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[recursion]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1134</guid>

					<description><![CDATA[<p>Write a program to calculate the factorial of a number using recursion. #include #include void main() { int n,fact; int rec(int); clrscr(); cout>n; fact=rec(n); cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-program-to-calculate-the-factorial-of-a-number-using-recursion/">C++ program to calculate the factorial of a number using recursion.</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a program to calculate the factorial of a number using recursion.</p>
<pre lang="cpp">
#include<iostream.h>
#include<conio.h>
void main()
{
	int n,fact;
	int rec(int); clrscr();
	cout<<"Enter the number:->";
	cin>>n;
	fact=rec(n);
	cout<<endl<<"Factorial Result are:: "<<fact<<endl;
	getch();
}
rec(int x)
{
	int f;
	if(x==1)
		return(x);
	else
	{
		f=x*rec(x-1);
		return(f);
	}
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-program-to-calculate-the-factorial-of-a-number-using-recursion/">C++ program to calculate the factorial of a number using recursion.</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-program-to-calculate-the-factorial-of-a-number-using-recursion/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
			</item>
		<item>
		<title>C program for Syntax Analyzer</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-syntax-analyzer/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-syntax-analyzer/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:54:13 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[codes]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Syntax Analyzer]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1128</guid>

					<description><![CDATA[<p>C program for Syntax Analyzer #include #include #include #include void main() { int i,j,k=0,count,inc=0,n; char name[30],open[30],ch,chh,o[30]; char op[20]={'=','+','-','*','/','%','^','&#038;','&#124;'}; clrscr(); textcolor(3); cprintf("--Syntax Analyser--"); printf("\n"); printf("\n Enter Syntax"); printf("\n"); scanf("%s",name); n=strlen(name); for(i=0;i</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-syntax-analyzer/">C program for Syntax Analyzer</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C program for Syntax Analyzer</p>
<pre lang="c">
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
void main()
 {
    int i,j,k=0,count,inc=0,n;
   char name[30],open[30],ch,chh,o[30];
   char op[20]={'=','+','-','*','/','%','^','&','|'};
   clrscr();
   textcolor(3);
   cprintf("--Syntax Analyser--");
   printf("\n");
   printf("\n Enter Syntax");
   printf("\n");
   scanf("%s",name);
   n=strlen(name);
   for(i=0;i<n;i++)
    {
      ch=tolower(name[i]);
      for(j=0;j<9;j++)
      {
        if(ch==op[j])
         {
           open[k]=i;
           o[k]=ch;
           k++;
         }
      }
   }
   for(i=0;i<k;i++)
    {
      count=open[i];
      ch=tolower(name[count-1]);
      chh=tolower(name[count+1]);
      if(isalpha(ch)&#038;&#038;isalpha(chh)||isdigit(chh))
       ++inc;
     }
   if(k==inc)
  printf("\n %s is a valid syntax",name);
 else
  printf("\n %s is an invalid syntax",name);
  getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-syntax-analyzer/">C program for Syntax Analyzer</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-syntax-analyzer/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>C program for Priority Scheduling</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-priority-scheduling/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-priority-scheduling/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:43:12 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Priority Scheduling]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1122</guid>

					<description><![CDATA[<p>C program for Priority Scheduling #include #include #include void main() { clrscr(); int x,n,p[10],pp[10],pt[10],w[10],t[10],awt,atat,i; printf("Enter the number of process : "); scanf("%d",&#038;n); printf("\n Enter process : time priorities \n"); for(i=0;i</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-priority-scheduling/">C program for Priority Scheduling</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C program for Priority Scheduling</p>
<pre lang="c">
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
 {
   clrscr();
   int x,n,p[10],pp[10],pt[10],w[10],t[10],awt,atat,i;
   printf("Enter the number of process : ");
   scanf("%d",&n);
   printf("\n Enter process : time priorities \n");
   for(i=0;i<n;i++)
    {
      printf("\nProcess no %d : ",i+1);
      scanf("%d  %d",&#038;pt[i],&#038;pp[i]);
      p[i]=i+1;
    }
  for(i=0;i<n-1;i++)
   {
     for(int j=i+1;j<n;j++)
     {
       if(pp[i]<pp[j])
       {
         x=pp[i];
         pp[i]=pp[j];
         pp[j]=x;
         x=pt[i];
         pt[i]=pt[j];
         pt[j]=x;
         x=p[i];
         p[i]=p[j];
         p[j]=x;
      }
   }
}
w[0]=0;
awt=0;
t[0]=pt[0];
atat=t[0];
for(i=1;i<n;i++)
 {
   w[i]=t[i-1];
   awt+=w[i];
   t[i]=w[i]+pt[i];
   atat+=t[i];
 }
printf("\n\n Job \t Burst Time \t Wait Time \t Turn Around Time   Priority \n");
for(i=0;i<n;i++)
  printf("\n %d \t\t %d  \t\t %d \t\t %d \t\t %d \n",p[i],pt[i],w[i],t[i],pp[i]);
awt/=n;
atat/=n;
printf("\n Average Wait Time : %d \n",awt);
printf("\n Average Turn Around Time : %d \n",atat);
getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-priority-scheduling/">C program for Priority Scheduling</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-priority-scheduling/feed/</wfw:commentRss>
			<slash:comments>47</slash:comments>
		
		
			</item>
		<item>
		<title>C progrma for First Come First Serve Algorithm</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-progrma-for-first-come-first-serve-algorithm/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-progrma-for-first-come-first-serve-algorithm/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:10:59 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[c progrma]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Source Codes]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1113</guid>

					<description><![CDATA[<p>C progrma for First Come First Serve Algorithm #include #include #include void main() { clrscr(); int p[20],b[20],w[20],t[20],i,v,n,at; int wt=0; float tw,tr; printf("Enter the number of process : "); scanf("%d",&#038;n); printf("enter CPU burst time : "); for(i=1;i</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-progrma-for-first-come-first-serve-algorithm/">C progrma for First Come First Serve Algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C progrma for First Come First Serve Algorithm</p>
<pre lang="c">
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
{
      clrscr();
      int p[20],b[20],w[20],t[20],i,v,n,at;
      int wt=0;
      float tw,tr;
      printf("Enter the number of process : ");
      scanf("%d",&n);
      printf("enter CPU burst time : ");
      for(i=1;i<=n;i++)
       {
         scanf("%d",&#038;b[i]);
         t[1]=b[1];
         w[1]=0;
         at=t[1];
         wt=w[1];
	for(i=2;i<=n;i++)
	{
	  t[i]=b[i]+t[i-1];
	  at=at+t[i];
	  w[i]=t[i-1];
	  wt=wt+w[i];
	 }
       }
      printf("process \t burst_time \t wait_time \t turn_around \t \n");
      for(i=1;i<=n;i++)
      {
         printf("%d \t\t %d \t\t %d \t\t %d",i,b[i],w[i],t[i]);
         printf("\n");
      }
      printf("\n average wait time");
      tw=wt/n;
      printf("%f",tw);
      printf("\n Average turn around time");
      tr=at/n;
      printf("%f",tr);
      getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-progrma-for-first-come-first-serve-algorithm/">C progrma for First Come First Serve Algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-progrma-for-first-come-first-serve-algorithm/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
			</item>
		<item>
		<title>C++ programs to implement the Prim’s algorithm to generate a minimum cost spanning tree</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-prim%e2%80%99s-algorithm-to-generate-a-minimum-cost-spanning-tree/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-prim%e2%80%99s-algorithm-to-generate-a-minimum-cost-spanning-tree/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 11 Mar 2010 16:53:26 +0000</pubDate>
				<category><![CDATA[Data structure]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[C Programs]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[Prim’s algorithm]]></category>
		<category><![CDATA[spanning tree]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1021</guid>

					<description><![CDATA[<p>/* Write C++ programs to implement the Prim’s algorithm to generate a minimum cost spanning tree */ #include #include #include using namespace std; int cost[10][10],i,j,k,n,stk[10],top,v,visit[10],visited[10],u; main() { int m,c; cout n; cout m; cout >j>>c; cost[i][j]=c; } for(i=1;i</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-prim%e2%80%99s-algorithm-to-generate-a-minimum-cost-spanning-tree/">C++ programs to implement the Prim’s algorithm to generate a minimum cost spanning tree</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>/* Write C++ programs to implement the Prim’s algorithm to generate a minimum cost spanning tree */</p>
<pre lang="cpp">
#include<iostream>
#include<conio.h>
#include<stdlib.h>
using namespace std;
int cost[10][10],i,j,k,n,stk[10],top,v,visit[10],visited[10],u;

main()
{
	int m,c;
	cout <<"enterno of vertices";
	cin >> n;
	cout <<"ente no of edges";
	cin >> m;
	cout <<"\nEDGES Cost\n";
	for(k=1;k<=m;k++)
	{
		cin >>i>>j>>c;
		cost[i][j]=c;
	}
	for(i=1;i<=n;i++)
	for(j=1;j<=n;j++)
		if(cost[i][j]==0)
		cost[i][j]=31999;

	cout <<"ORDER OF VISITED VERTICES";
	k=1;
	while(k<n)
	{
		m=31999;
		if(k==1)
		{
			for(i=1;i<=n;i++)
				for(j=1;j<=m;j++)
				if(cost[i][j]<m)
				{
					m=cost[i][j];
					u=i;
				}
		}
		else
		{
			for(j=n;j>=1;j--)
			if(cost[v][j]<m &#038;&#038; visited[j]!=1 &#038;&#038; visit[j]!=1)
			{
				visit[j]=1;
				stk[top]=j;
				top++;
				m=cost[v][j];
				u=j;
			}
		}
		cost[v][u]=31999;
		v=u;
		cout<<v << " ";
		k++;
		visit[v]=0; visited[v]=1;
	}
}
</pre>
<p><strong>OUTPUT</strong></p>
<p>enterno of vertices7<br />
ente no of edges9</p>
<p>EDGES Cost<br />
1 6 10<br />
6 5 25<br />
5 4 22<br />
4 3 12<br />
3 2 16<br />
2 7 14<br />
5 7 24<br />
4 7 18<br />
1 2 28<br />
ORDER OF VISITED VERTICES1 6 5 4 3 2</p><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-prim%e2%80%99s-algorithm-to-generate-a-minimum-cost-spanning-tree/">C++ programs to implement the Prim’s algorithm to generate a minimum cost spanning tree</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-prim%e2%80%99s-algorithm-to-generate-a-minimum-cost-spanning-tree/feed/</wfw:commentRss>
			<slash:comments>26</slash:comments>
		
		
			</item>
		<item>
		<title>Java program of Client-Server network for Chatting between Client and Server</title>
		<link>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-of-client-server-network-for-chatting-between-client-and-server/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-of-client-server-network-for-chatting-between-client-and-server/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Oct 2009 16:21:21 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[client s]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[client server in java]]></category>
		<category><![CDATA[chat in java]]></category>
		<category><![CDATA[chat between client and server]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=908</guid>

					<description><![CDATA[<p>BufferedReader cin=newBufferedReader(newInputStreamReader(sk.getInputStream()));<br />
PrintStream cout=new PrintStream(sk.getOutputStream());<br />
BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/advanced/java-program-of-client-server-network-for-chatting-between-client-and-server/">Java program of Client-Server network for Chatting between Client and Server</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="java" escaped="true" line="1">
import java.net.*;
import java.io.*;

public class  chatserver
{
	public static void main(String args[]) throws Exception
	{
		ServerSocket ss=new ServerSocket(2000);
		Socket sk=ss.accept();
		BufferedReader cin=newBufferedReader(newInputStreamReader(sk.getInputStream()));
		PrintStream cout=new PrintStream(sk.getOutputStream());
		BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while (  true )
		{
			s=cin.readLine();
  			if (s.equalsIgnoreCase("END"))
  			{
				cout.println("BYE");
    				break;
  			  }
			System. out.print("Client : "+s+"\n");
			System.out.print("Server : ");
			s=stdin.readLine();
			cout.println(s);
		}
		ss.close();
 		sk.close();
 		cin.close();
		cout.close();
 		stdin.close();
	}
}

public class  chatclient
{
	public static void main(String args[]) throws Exception
	{
		Socket sk=new Socket("192.168.0.19",2000);
		BufferedReader sin=new BufferedReader(new InputStreamReader(sk.getInputStream()));
		PrintStream sout=new PrintStream(sk.getOutputStream());
		BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while (  true )
		{
			System.out.print("Client : ");
			s=stdin.readLine();
			sout.println(s);
			s=sin.readLine();
			System.out.print("Server : "+s+"\n");
  			if ( s.equalsIgnoreCase("BYE") )
 			   break;
		}
		 sk.close();
		 sin.close();
		 sout.close();
 		stdin.close();
	}
}
</pre>
<p><strong>Output:</strong></p>
<p>Java chatclient</p>
<p>From Server :  Hi<br />
From Client: Hi<br />
From Server: Good morning<br />
From Client: End<br />
From Server:Bye</p><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/advanced/java-program-of-client-server-network-for-chatting-between-client-and-server/">Java program of Client-Server network for Chatting between Client and Server</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-of-client-server-network-for-chatting-between-client-and-server/feed/</wfw:commentRss>
			<slash:comments>33</slash:comments>
		
		
			</item>
		<item>
		<title>Java program that checks whether the given string is palindrome or not</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-checks-whether-the-given-string-is-palindrome-or-not/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-checks-whether-the-given-string-is-palindrome-or-not/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 15:12:38 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java codes]]></category>
		<category><![CDATA[palindrome]]></category>
		<category><![CDATA[palindrome program in java]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=854</guid>

					<description><![CDATA[<p>StringBuffer s1=new StringBuffer(args[0]);<br />
		StringBuffer s2=new StringBuffer(s1);<br />
		s1.reverse();<br />
		System.out.println(“Given String is:”+s2);<br />
		System.out.println(“Reverse String is”+s1);</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-checks-whether-the-given-string-is-palindrome-or-not/">Java program that checks whether the given string is palindrome or not</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>class palindrome<br />
{<br />
	public static void main(String[] args)<br />
	{<br />
		StringBuffer s1=new StringBuffer(args[0]);<br />
		StringBuffer s2=new StringBuffer(s1);<br />
		s1.reverse();<br />
		System.out.println(“Given String is:”+s2);<br />
		System.out.println(“Reverse String is”+s1);<br />
		if(String.valueOf(s1).compareTo(String.valueOf(s2))==0)<br />
			System.out.println(“Palindrome”);<br />
		else<br />
			System.out.println(“Not Palindrome”);<br />
	}<br />
}</p>
<p><strong>Output:</strong></p>
<p>Java palindrome madam<br />
Given String is:madam<br />
Reverse String is madam<br />
Palindrome</p>
<p>Java palindrome harish<br />
Given String is:harish<br />
Reverse String is hsirah<br />
Not Palindrome</p><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-checks-whether-the-given-string-is-palindrome-or-not/">Java program that checks whether the given string is palindrome or not</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-checks-whether-the-given-string-is-palindrome-or-not/feed/</wfw:commentRss>
			<slash:comments>27</slash:comments>
		
		
			</item>
		<item>
		<title>C graphics program for analog clock</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 12:51:49 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[digital clock]]></category>
		<category><![CDATA[clock in c]]></category>
		<category><![CDATA[analog clock]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[c graphics]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=843</guid>

					<description><![CDATA[<p>Time_Dig[0]=hour/10+48;<br />
      Time_Dig[1]=hour%10+48;<br />
      Time_Dig[2]=':';<br />
      Time_Dig[3]=min/10+48;<br />
      Time_Dig[4]=min%10+48;<br />
      Time_Dig[5]=':';<br />
      Time_Dig[6]=sec/10+48;</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/">C graphics program for analog clock</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c">
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>

#define arg_sec M_PI/30
#define arg_hour M_PI/6
#define arg_min M_PI/360
void main()
{
  int gd=DETECT,gm,sec=0,hour,min,x1=0,y1=0,x2=0,y2=0,x3=0,y3=0;
  char *k[12]={"1","2","3","4","5","6","7","8","9","10","11","12"};
  struct time t;
  initgraph(&gd,&gm,"");
  setcolor(YELLOW);
  circle(300,200,200);
  circle(300,200,180);
  setfillstyle(1,RED);
  floodfill(300,390,YELLOW);
  settextstyle(DEFAULT_FONT,0,2);
//----------------------Constants----------------------//

  int a,b;
  for(int i=1;i<13;i++)
    {
	a=160*cos(arg_hour*i-M_PI_2);
	b=160*sin(arg_hour*i-M_PI_2);
	outtextxy(a+300,b+200,k[i-1]);
    }

//----------------------Constants----------------------//
/*****************************************************
		 1-Good
		 2-Small
		 3-Watse
		 4-caligraphy
		 5-cursive
		 6-good
		 7-excellent
		 8-Good
		 9-Big
		 10-Double
 ****************************************************/
 int dig_sec;
 char Time_Dig[14];
  while(!kbhit())
   {
       settextstyle(7,0,4);
      outtextxy(264,100,"Satya");
      settextstyle(7,0,1);
      outtextxy(278,280,"Quartz");
      setcolor(BLACK);
      line(300,200,x1+300,y1+200);
      line(300,200,x2+300,y2+200);
      line(300,200,x3+300,y3+200);
      gettime(&#038;t);
      if(sec!=t.ti_sec)
	{
	   sound(5000);
	   delay(1);
	   nosound();
	}
      hour=t.ti_hour;
      sec=t.ti_sec;
      min=t.ti_min;
      Time_Dig[0]=hour/10+48;
      Time_Dig[1]=hour%10+48;
      Time_Dig[2]=':';
      Time_Dig[3]=min/10+48;
      Time_Dig[4]=min%10+48;
      Time_Dig[5]=':';
      Time_Dig[6]=sec/10+48;
      Time_Dig[7]=sec%10+48;
      Time_Dig[8]='\0';
      outtextxy(270,250,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ");
      x1=150*cos(arg_sec*sec-M_PI_2)*0.98;
      y1=150*sin(arg_sec*sec-M_PI_2)*0.98;
      x2=150*cos(arg_sec*min-M_PI_2)*0.9;
      y2=150*sin(arg_sec*min-M_PI_2)*0.9;
      if(hour>12) hour-=12;
      x3=150*cos(arg_hour*hour-M_PI_2+arg_min*min)*0.6;
      y3=150*sin(arg_hour*hour-M_PI_2+arg_min*min)*0.6;
      setcolor(YELLOW);
      line(300,200,x1+300,y1+200);
      setcolor(CYAN);
      line(300,200,x2+300,y2+200);
      setcolor(WHITE);
      line(300,200,x3+300,y3+200);
      setcolor(YELLOW);
      outtextxy(270,250,Time_Dig);
      delay(50);

   }

  getch();
  closegraph();
  restorecrtmode();
}
</pre>
<p><a href="https://studentprojects.in/wp-content/uploads/2009/10/Clock.zip"><br />
Click here</a> to download the source code.</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/">C graphics program for analog clock</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
