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.