Lesson 11 of 23

Arrays

9 min 25 XP

Array ఒకే type values ను వరుస memory లో నిల్వ చేస్తుంది. Indexes 0 నుండి మొదలవుతాయి. C bounds ను తనిఖీ చేయదు: 5 అంశాల array లో a[10] రాస్తే memory పాడవుతుంది, జాగ్రత్త!

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

sizeof(arr) / sizeof(arr[0]) అంశాల సంఖ్యను ఇస్తుంది, కానీ array declare చేసిన function లో మాత్రమే.

Challenge

+25 XP

n మరియు n వేర్వేరు సంఖ్యలను చదివి, రెండవ అతిపెద్దదాన్ని print చేయండి. Input: 5 3 8 1 9 4 Output: 8

Output Loading C (first time takes a few seconds)
Press Run to see the result here.