Lesson 20 of 23

Pointers ಮತ್ತು Arrays

10 min 35 XP

Array ಯ ಹೆಸರು ಅದರ ಮೊದಲ ಅಂಶದ address, ಆದ್ದರಿಂದ a[i] ಮತ್ತು *(a + i) ಒಂದೇ. p++ ಮುಂದಿನ ಅಂಶಕ್ಕೆ ಹೋಗುತ್ತದೆ (int ಗೆ 4 bytes ಮುಂದೆ).

Example: edit me and press Run

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

Challenge

+35 XP

n ಮತ್ತು n ಸಂಖ್ಯೆಗಳನ್ನು ಓದಿ. Pointers ಮಾತ್ರ ಬಳಸಿ (a[i] ಅಲ್ಲ; *(a + i) ಅಥವಾ p++) array ಅನ್ನು ಅದೇ ಸ್ಥಳದಲ್ಲಿ ತಿರುಗಿಸಿ print ಮಾಡಿ. Input: 5 1 2 3 4 5 Output: 5 4 3 2 1

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