🎓 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
  • 980
    Views
  • 5
    Participants
Last reply from:
FreeAllYouCan-OFFICIAL

Trending Topics

Online now

Members online
387
Guests online
3,983
Total visitors
4,370

Forum statistics

Threads
2,349,634
Posts
29,363,501
Members
1,091,220
Latest member
nfrxdra0
Back
Top