<?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>array in c - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/array-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/array-in-c/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Fri, 30 Sep 2022 09:33:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>array in c - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/array-in-c/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is Array in C ?</title>
		<link>https://www.wikitechy.com/interview-questions/c/what-is-array-in-c/</link>
					<comments>https://www.wikitechy.com/interview-questions/c/what-is-array-in-c/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Fri, 30 Sep 2022 09:33:22 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[array in c]]></category>
		<category><![CDATA[array in c programming examples]]></category>
		<category><![CDATA[how do you initialize an array in c]]></category>
		<category><![CDATA[multidimensional array in c]]></category>
		<category><![CDATA[one dimensional array in c]]></category>
		<category><![CDATA[string array in c]]></category>
		<category><![CDATA[syntax of array]]></category>
		<category><![CDATA[what is an array base address in c language]]></category>
		<category><![CDATA[what is an array in c]]></category>
		<category><![CDATA[what is an array in c language]]></category>
		<category><![CDATA[what is an array in c plus plus]]></category>
		<category><![CDATA[what is an array in c programming]]></category>
		<category><![CDATA[what is an array in c++ with example]]></category>
		<category><![CDATA[what is the maximum number of dimensions an array in c]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4882</guid>

					<description><![CDATA[Arrays are defined as collection of similar type of data items that is stored at consecutive blocks of memory locations. Arrays are deprived data types which can store primitive data types such as int, char, float, double etc. Arrays are also used to store pointers and structures in C. Arrays are considered as simplest data [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li>Arrays are defined as collection of similar type of data items that is stored at consecutive blocks of memory locations.</li>
<li>Arrays are deprived data types which can store primitive data types such as int, char, float, double etc.</li>
<li>Arrays are also used to store pointers and structures in C.</li>
<li>Arrays are considered as simplest data structure where each data element can be randomly accessed using its index numbers.</li>
<li>Array index starts from 0 to n number of elements.</li>
<li>Array Size once fixed cannot be changed in the program.</li>
</ul>
<h2 id="properties-of-array"><strong>Properties of Array</strong></h2>
<ul>
<li style="text-align: justify;">Each element in the array is of the same data type of which the array is declared.</li>
<li style="text-align: justify;">Array carries the same size int = 4bytes.</li>
<li style="text-align: justify;">Elements in array are arranged in a consecutive blocks of memory at memory locations.</li>
<li style="text-align: justify;">The first element in the array is stored at the smallest memory location.</li>
<li style="text-align: justify;">Elements of the array can be randomly accessed since we calculate the index of each element of the array with the given base address and the size of the element.</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4884 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array.jpg" alt="" width="471" height="193" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array.jpg 471w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array-300x123.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array-390x160.jpg 390w" sizes="(max-width: 471px) 100vw, 471px" /></p>
<h2 id="advantages-of-array"><strong>Advantages of Array</strong></h2>
<ul>
<li style="text-align: justify;"><strong>Arrays </strong>use less code for code effectiveness.</li>
<li style="text-align: justify;">By using the  loop, we can retrieve the elements of an array easily.</li>
<li style="text-align: justify;">To sort the elements of the array, we need a few lines of code only.</li>
<li style="text-align: justify;">We can access any element randomly using the array.</li>
</ul>
<p><img decoding="async" class="alignnone size-full wp-image-4883" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/array-in-c.jpg" alt="" width="553" height="428" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/array-in-c.jpg 553w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/array-in-c-300x232.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/array-in-c-390x302.jpg 390w" sizes="(max-width: 553px) 100vw, 553px" /></p>
<h2 id="declaration-of-c-array"><strong>Declaration of C Array</strong></h2>
<p style="background: white;"><span lang="EN-US" style="font-size: 16.0pt; font-family: 'Segoe UI',sans-serif; color: #333333;">We can declare an array in the c language as below</span></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">data_type array_name[array_size];  </code></pre> </div>
<p style="text-align: justify; background: white;"><span lang="EN-US" style="font-size: 16.0pt; font-family: 'Segoe UI',sans-serif; color: #333333;">Now, let us see the example to declare the array.</span></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">int marks[5];  </code></pre> </div>
<p style="text-align: justify; background: white;"><span lang="EN-US" style="font-size: 16.0pt; font-family: 'Segoe UI',sans-serif; color: #333333;">Here, int is the <em><span style="font-family: 'Segoe UI',sans-serif;">data_type</span></em>, marks are the <em><span style="font-family: 'Segoe UI',sans-serif;">array_name</span></em>, and 5 is the <em><span style="font-family: 'Segoe UI',sans-serif;">array_size</span></em>.</span></p>
<h2 id="initialization-of-c-array" style="text-align: justify;"><strong>Initialization of C Array</strong></h2>
<p style="text-align: justify; background: white;"><span lang="EN-US" style="font-size: 16.0pt; font-family: 'Segoe UI',sans-serif; color: #333333;">The simplest way to initialize an array is by using the index of each element. We can initialize each element of the array by using the index. Consider the following example.</span></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">marks[0]=80;//initialization of array  <br/>marks[1]=60;  <br/>marks[2]=70;  <br/>marks[3]=85;  <br/>marks[4]=75;  </code></pre> </div>
<p style="text-align: justify; background: white;"><span lang="EN-US" style="font-size: 16.0pt; font-family: 'Segoe UI',sans-serif; color: #333333;">Pictorial representation of array initialization</span></p>
<p><img decoding="async" class="alignnone size-full wp-image-4886" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array-initialization.jpg" alt="" width="355" height="80" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array-initialization.jpg 355w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/c-array-initialization-300x68.jpg 300w" sizes="(max-width: 355px) 100vw, 355px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/c/what-is-array-in-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Write a function that takes an integer array as an input and find the largest number in the array. You cannot sort array or use any API or searching needs ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/write-a-function-that-takes-an-integer-array-as-an-input-and-find-the-largest-number-in-the-array-you-cannot-sort-array-or-use-any-api-or-searching-needs/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/write-a-function-that-takes-an-integer-array-as-an-input-and-find-the-largest-number-in-the-array-you-cannot-sort-array-or-use-any-api-or-searching-needs/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:02:37 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[2d array c++]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[algorithm to find largest number in an array]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[array find]]></category>
		<category><![CDATA[array in c]]></category>
		<category><![CDATA[array in c programming]]></category>
		<category><![CDATA[array programs in java]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[c interview questions]]></category>
		<category><![CDATA[c program to find largest number in an array]]></category>
		<category><![CDATA[c program to find largest number in an array using function]]></category>
		<category><![CDATA[c program to find largest of n numbers]]></category>
		<category><![CDATA[c++ array class]]></category>
		<category><![CDATA[c++ array functions]]></category>
		<category><![CDATA[c++ program to find largest and second largest number in an array]]></category>
		<category><![CDATA[c++ program to find largest and smallest number in an array]]></category>
		<category><![CDATA[c++ program to find largest of n numbersdynamic array c++]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[cpp interview questions]]></category>
		<category><![CDATA[cpp interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[eInfochips interview questions and answers]]></category>
		<category><![CDATA[Electronics Arts Inc interview questions and answers]]></category>
		<category><![CDATA[find largest number in an array]]></category>
		<category><![CDATA[find largest number in array]]></category>
		<category><![CDATA[find largest number in array c++]]></category>
		<category><![CDATA[find largest number in array in java]]></category>
		<category><![CDATA[find largest number in array java]]></category>
		<category><![CDATA[find largest number in array javascript]]></category>
		<category><![CDATA[find largest number in java]]></category>
		<category><![CDATA[find second largest number in array in java]]></category>
		<category><![CDATA[find smallest number in array c++]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Harman International interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[java find largest number in list]]></category>
		<category><![CDATA[largest number formed from an array in clength of array c++]]></category>
		<category><![CDATA[Larsen & Toubro interview questions and answers]]></category>
		<category><![CDATA[Mathworks India Private Limited interview questions and answers]]></category>
		<category><![CDATA[Mavenir interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Philips Software Centre Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[program to find largest number in an array]]></category>
		<category><![CDATA[return array c++string array c++]]></category>
		<category><![CDATA[SRM Technologies interview questions and answers]]></category>
		<category><![CDATA[Symphony Teleca interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[Tecnotree interview questions and answers]]></category>
		<category><![CDATA[two dimensional array in c++ example]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[Wipro interview questions and answers]]></category>
		<category><![CDATA[Yash Technologies interview questions and answers]]></category>
		<category><![CDATA[zycus infotech interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=358</guid>

					<description><![CDATA[Answer : #include<iostream>...]]></description>
										<content:encoded><![CDATA[<h4 id="write-a-function-that-takes-an-integer-array-as-an-input-and-find-the-largest-number-in-the-array-you-cannot-sort-array-or-use-any-api-or-searching-needs" class="color-pink" style="text-align: justify;">Write a function that takes an integer array as an input and find the largest number in the array. You cannot sort array or use any API or searching needs ?</h4>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-cpp code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-cpp code-embed-code">#include&lt;iostream&gt;<br/>using namespace std;<br/><br/>int main()<br/>{<br/>int name[5],big,i;<br/><br/>for(i=0; i&lt;=4; i++) {<br/>cout &lt;&lt; &quot;Enter a value&quot; &lt;&lt; i &lt;&lt; &quot;:&quot;;<br/>cin &gt;&gt; name[i];<br/>}<br/>cout &lt;&lt; &quot;name contains:&quot;;<br/>for(i=0; i&lt;=4; i++) {<br/>cout &lt;&lt; name[i]&lt;&lt; &quot;\n&quot;;<br/>}<br/><br/>big = name[0];<br/>for(i = 0; i &lt;= 4; i++) {<br/>if(name[i] &gt; big)<br/>big = name[i];<br/>}<br/><br/>cout &lt;&lt; &quot;The Bigest Number::&quot; &lt;&lt; big &lt;&lt; endl;<br/><br/>return 0;<br/>}</code></pre> </div>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/write-a-function-that-takes-an-integer-array-as-an-input-and-find-the-largest-number-in-the-array-you-cannot-sort-array-or-use-any-api-or-searching-needs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
