Print Data from Array Index

How do you print data from an arry index by stating the position as the output in the C program?

Questions by susies_2

Showing Answers 1 - 3 of 3 Answers

krishnateja

  • Feb 24th, 2010
 

A simple for loop as described bellow is sufficient

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

        printf("the element in %d is %d",i,a[i]);

i is defined and n is the array size

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions