BUY TELUGU TUTORIAL DVD'S:::: SEO::3500/-,DCA(DOS,WINDOWS,WORD,EXCEL,POWER POINT, MS ACCESS, INTERNET CONCEPTS)::499/-,DTP(PHOTOSHOP,PAGEMAKER, CORELDRAW,TELUGU TYPING)::999/-,C::700,C++::900,TALLY ERP 9:: 999,ORACLE:999/-,CORE JAVA::1000/-,SPOKEN HINDI:500,HTML::500/-,AUTOCAD::2500/-,DCA+DTP::1000/-,DCA+TALLY::1000,C,C++,JAVA::1500, ALL COURSES(DCA,DTP,C,C++,JAVA,ORACLE,TALLY,HTML,SPOKEN HINDI,AUTOCAD):: 3500/-..CONTACT : SYED HAFIZ, SHOPPING COMPLEX,8INCLINE COLONY,GODAVARI KHANI,KARIMNAGAR, TELANGANA,CELL:9395306603,EMAIL:COOLHAFI7@GMAIL.COM.
Download http://bigtheme.net/joomla Free Templates Joomla! 3
Home / C / C Basics in telugu Array-2 part 28

C Basics in telugu Array-2 part 28

Accessing Array Elements

An element is accessed by indexing the array name. This is done by placing the index of the element within square brackets after the name of the array. For example:

double salary = balance[9];

The above statement will take 10th element from the array and assign the value to salary variable. Following is an example which will use all the above mentioned three concepts viz. declaration, assignment and accessing arrays:

C in Telugu Arrays

#include

int main ()
{
int n[ 10 ]; /* n is an array of 10 integers */
int i,j;

/* initialize elements of array n to 0 */
for ( i = 0; i < 10; i++ ) { n[ i ] = i + 100; /* set element at location i to i + 100 */ } /* output each array element's value */ for (j = 0; j < 10; j++ ) { printf("Element[%d] = %dn", j, n[j] ); } return 0; }

About Hafiz

Check Also

C Language in Telugu Strings exp1

The string in C programming language is actually a one-dimensional array of characters which is …

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

STATE BANK OF HYDERABAD, ***NAME:Hafiz SD, BRANCH:JALLARAM, ACCOUNT.NO:62041435239, IFSC CODE:SBHY0020609,****, ANDRA BANK*** NAME:SYED HAFEEZ BABA, BRANCH:8INCLINE COLONY, ACCOUNT.NO:116710100037533****SBI****NAME:SYED HAFEEZ BABA,ACCOUNT NO:35321924009,IFSC CODE:SBIN0013338,BRANCH:GODAVARIKHANI.,...