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

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

DBMS Degree Lab Records

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

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

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