🎓 Academic Paturo nga po sa arrays c++

Status
Not open for further replies.
kahit po ako walang naintindihan dyan eh. buti pa sa minors ko may pag asa pa.. hehe. nakakainggit yung mga magagaling dyan at pati sa ibang mga language
 
medyo basic lang yung tanong ko sir pano po ba ma access yung value na nilalagay sa allocated size ng array kunware num[4]={23,54,65,32}; pano ko palalabasin yung 32 pag inenter ko eh 4?

Let x is ur search input.

Error yan pag nilagay mo 4 out of bounds .. your initalized num to 4 indexes.. kung gusto mo malabas si 32.. based sa array mo.. yung location ng 32 is on index 3.. index always start at 0 ... so

x = 3

cout << num[x];
 
Status
Not open for further replies.

About this Thread

  • 7
    Replies
  • 858
    Views
  • 5
    Participants
Last reply from:
FreeAllYouCan-OFFICIAL

New Topics

Online now

Members online
952
Guests online
1,094
Total visitors
2,046

Forum statistics

Threads
2,273,869
Posts
28,952,155
Members
1,234,981
Latest member
AprilSiading
Back
Top