i[3] or 3[i] Я [3] і 3 [I]
Last night a while writing a very basic program in 'C' language, I came across something weird. Минулої вночі в той час як написання дуже базову програму в 'C' мови, я виявив щось дивне. Basically in 'C' if you want to display the value of some element in an array it is denoted as i [no. В основному в 'C', якщо ви хочете відображати значення деяких елементів у масиві він позначається як I [NO. of index], where 'i' is name of the array and in square bracket you write the index number, which u want to display. індекс], де 'I' це ім'я масиву і в квадратних дужках записати індексний номер, який хочете побачити.
The mistake I made was I wrote the index_number[name of array] ( Wrote 3[i] instead of i[3] ) and it gave the same result as it should have given, if I had written it correctly. Помилка я зробив, я написав index_number [ім'я масиву] (він написав 3 [I], замість I [3]), і він дав той же результат, як це слід було б, якби я написав це правильно. Check the screenshot shown below. Перевірте скріншот показано нижче.
Code: Код:

Output Результат

Now I m wondering how does that happen, I mean whatever I have read about 'C' programming as yet, says i[3] is the method to access the element at 3rd index, in fact I have not ever came across any notation of the form 3[i], so what's the issue, have you ever seen this, why does this happen, any idea? Тепер я м цікаво, як це сталося, я маю на увазі, що я читав про 'C' програмування поки, каже, я [3] є спосіб отримати доступ до елементу з індексом 3, на самом деле я ніколи не виявив яких-небудь запису форма 3 [I], так що це питання, ви всі бачили це, чому це сталося, які-небудь ідеї?
If you want to download this code and see it yourself, Якщо ви хочете завантажити цей код і подивіться самі, here is the file Ось фото , we have uploaded it for you. , Ми завантажені це для вас.
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |

Posted on 9th April 2008 by Опубліковано 9 квітня 2008 року Manav Mishra Manav Мішра , here to write articles about things which are somehow related to computers, internet (and at times, may be, to blogging as well). Тут, щоб написати статті про речі, які так чи інакше пов'язані з комп'ютерами, Інтернетом (і, часом, може бути, для блогів, а). He wants to make an Identity for himself, he loves, testing new softwares and services which can really help to improve the productivity of individual. All posts by Він хоче зробити Identity для себе, він любить, тестування нового програмного забезпечення та послуг, які можуть реально допомогти поліпшити продуктивність особистості. Всі посади Manav Mishra Manav Мішра | Connect with me @ | Зв'язатися зі мною @ Twitter Щебетати | | Stumble Stumble | Need more help? | Потрібна допомога? Ask your Questions at our Задайте свої питання на нашому Support Center Центр підтримки




























Free Email Subscription
Leave your response! Залиште свій відгук!