C programming ppt slides, pdf on arrays



Download 0,84 Mb.
bet7/9
Sana25.09.2021
Hajmi0,84 Mb.
#185314
1   2   3   4   5   6   7   8   9
Bog'liq
algio

ARRAYS

  • Arrays allow programmers to group related items of the same data type in one variable.
  • However, when referring to an array, one has to specify not only the array or variable name but also the index number of interest.
  • Program example 1: Sum of array’s element.
  • Notice the array's element which is not initialized is set to 0 automatically.
  • www.tenouk.com, ©
  • /25

ARRAYS

  • Program example 2: Searching the smallest value.
  • Finding the smallest element in the array named fSmallest. 
  • First, it assumes that the smallest value is in fSmallest[0] and assigns it to the variable nSmall.
  • Then it compares nSmall with the rest of the values in fSmallest, one at a time.
  • When an element is smaller than the current value contained in nSmall, it is assigned to nSmall.  The process finally places the smallest array element in nSmall.
  • www.tenouk.com, ©
  • /25

Download 0,84 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish