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

New Topics

Trending Topics

Online now

Members online
1,073
Guests online
1,009
Total visitors
2,082

Forum statistics

Threads
2,284,439
Posts
29,023,318
Members
1,219,995
Latest member
bababananana
Back
Top