Free Online Tutorials ==>> Machine Learning || Python Programming || DBMS || OOPs using C++ || DSA || Java Programming || Linux/Unix || C Programming
Go to your University || Python Lab || DSA Lab || AI & Machine Learning Lab || Linux Lab || OOPs Lab || DBMS Lab || JAVA Lab ||| Free Online Tutorials ||| 
companies for Campus Placement || Logical Reasoning || Quantitative Aptitude || General English || Technical-MCQ and Interview Questions || HR Interview Questions
0 like 0 dislike
33 views

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.8k points)
 
Best answer
#include <stdio.h>

#define ARRLEN (10)

int main (void)

{

int n[ ARRLEN ]; /* n is an array of 10 integers */   

size_t i, j; /* Use size_t to address memory, that is to index arrays, as its guaranteed to                   be wide enough to address all of the possible available memory. Using signed integers to do so should be considered a special use case, and should be restricted to the uncommon case of being in the need of  negative indexes. */

   /* Initialize elements of array n. */           

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

{      

n[ i ] = i + 100; /* Set element at location i to i + 100. */   

}      /* Output each array element's value. */   

for (j = 0; j < ARRLEN ; j++ )   

{      

printf("Element[%zu] = %d\n", j, n[j] );   

}

   return 0;

}
  Realize your learning potential with courses starting at ₹ 420
 Placements:   List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Online Free Training:  MACHINE LEARNINGPython Programming | Database Management System(DBMS) | Object Oriented Programming(OOPs) using C++ | Data Structures and Algorithms(DSA) | Java Programming | Linux/Unix | C Programming
Exams: List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Goeduhub
About Us | Contact Us   Social::   |  | 
...