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

Trending Topics

Online now

Members online
382
Guests online
4,850
Total visitors
5,232

Forum statistics

Threads
2,328,520
Posts
29,242,775
Members
1,159,859
Latest member
PureLett
Back
Top