c-record - 6) single dimensional array

 /* single-dimensional Array*/

#include<stdio.h>

#include<conio.h>  

void main()

{      

int i=0;    

int marks[5]; //declaration of array       

clrscr();

marks[0]=80; //initialization of array    

marks[1]=60;    

marks[2]=70;    

marks[3]=85;    

marks[4]=75;    

//traversal of array    

for(i=0;i<5;i++)

{      

printf("MARKS=%d \n",marks[i]);    

} //end of for loop     

getch();  

}    


output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile




Comments

Popular posts from this blog

SOFTWARE

e-com sem-3

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

unit-1 E- Commerce

6)what are the various service of internet and protocols ICT-unit-1

e com partical

Unit-II: HTML Coding Standards & Elements

Unit-V: Image Manipulations, Audio and Video & Introduction to JavaScript

Unit-III: Cascading Style Sheets (CSS) - HTML