<?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>Linear Search algorithm | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/linear-search-algorithm/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 27 Jan 2011 11:43:53 +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>Program to implement Linear Search algorithm</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 30 Jan 2011 11:41:44 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[C Programs]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Linear Search algorithm]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1221</guid>

					<description><![CDATA[<p>#include #include void read(int a[10],int n) { cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/">Program to implement Linear Search algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="cpp">
#include<iostream.h>
#include<constream.h>
void read(int a[10],int n)
{
	cout<<"reading\n";
	for(int i=0;i<n;i++)
		cin>>a[i];
}
void display(int a[10],int n)
{
	for(int i=0;i<n;i++)
		cout<<a[i]<<"\t";
}
void linearsearch ( int a[10],int n  )
{
	int k,flag=0;
	read(a,n);
	display(a,n);
	cout<<"\nenter an element to be search\n";
	cin>>k;
	for(int i=0;i<n;i++)
	{
		if(a[i]==k)
			flag=1;
		break;
	}
	if(flag==1)
		cout << "\nsearching is  successful,element is found at position " << i +1<<endl;
	else
		cout<<"searching not successful\n";
}
void main()
{
	int a[10], n;
	clrscr();
	cout<<"enter n value..\n";
	cin>>n;
	linearsearch(a,n);
	getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/">Program to implement Linear Search algorithm</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-advanced/program-to-implement-linear-search-algorithm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
