Something You Want to Know About Arrays
Would you like to react to this message? Create an account in a few clicks or log in to continue.

What is an Array?

+25
Jung kook
iramae
Ferre
Bermon O. Ferreras Jr
Rfrancis03
ellariana
HENERAL LUNA
Richard
Rhei
rsls
Noob
jandercoliao
Asdfghjkl
Asparin
Passerby
Myra Monique Acuna
Pox
Lawrence
judedominguiano
airojames
Emie Ligutan
Sean
Sean Monacillo
LouiseSebastianeYagi
justjoking10
29 posters
Go down
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty What is an Array?

Fri Jul 20, 2018 12:18 pm

What is Arrays?

• Arrays is a series or list of values in computer memory
• All the values must be the same data type
• Each data item is one element of the array
• You can indicate the number of elements an array will hold—the size of the array




What is an Array? Pictur10





• Each array element is differentiated from the others with a unique subscript, also called an index

In this example, it shows a three-element array declaration

num prices[3] = {25.00, 36.50, 47.99}
prices[0] = 25.00
prices[1] = 36.50
prices[2] = 47.99





What is an Array? 110






There are some reminders in declaring an arrays, these are:

1. Make sure any subscript remains less than the constant value.
2. Declare a named numeric constant to be used every time the array is accessed.


What are the characteristics of an array?

1. An array is a list of data items in contiguous memory locations.
2. Each data item in an array is an element.
3. Each array element is the same data type; by default, this means that each element is the same size.
4. Each element is differentiated from the others by a subscript, which is a whole number.
5. Usable subscripts for an array range from 0 to one less than the number of elements in an array.
6. Each array element can be used in the same way as a single item of the same data type.
avatar
justjoking10
Expert
Posts : 13
Join date : 2018-08-02

What is an Array? Empty RE:What is an Array?

Thu Aug 02, 2018 5:22 pm
What is the difference of an array and a list?
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 6:14 pm
justjoking10 wrote:What is  the difference of an array and a list?

Thank you for reminding me this question Brix.
Arrays and Lists can both used to store data but their main difference is that ARRAYS is a list of data that is usually stored in a blocks of memory and each element has their own index. While LISTS is a set of data that is arranged in some sort of order.

Another thing, the differences of the two is that ARRAYS can allow "direct access" and "sequential access" on the data while in LISTS allow only a sequential access.
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 6:34 pm
Ma’am is it possible that an array can exist within a list?

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 6:46 pm
LouiseSebastianeYagi wrote:Ma’am is it possible that an array can exist within a list?

Sent from Topic'it App

To make it clear, ARRAYS is a type of list and you can put any value on arrays (because it does not requires a sequential data values). A LIST is an abstract data type that implies an ordered sequence.
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 6:53 pm
About dun sa example kanina ma’am, yung 998 po, if yung array mo po is 998, bale yung zeros mo po sa declaration ay ganun din po kadami meaning mahaba po yung sa declarations. Paano po paiikliin yun? Hindi ko po kasi naintindihan masyado kanina kung paano po.

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:19 pm
LouiseSebastianeYagi wrote:About dun sa example kanina ma’am, yung 998 po, if yung array mo po is 998, bale yung zeros mo po sa declaration ay ganun din po kadami meaning mahaba po yung sa declarations. Paano po paiikliin yun? Hindi ko po kasi naintindihan masyado kanina kung paano po.

Sent from Topic'it App

Yung sa 998 na issue na yun, not always naman is gagamitin mo yung magdedeclare ka ng zeros, kaya lang siya ginawa kanina to make sure na walang laman yung array elements naten.
Yung shortcut or yung pwede naman na gawin ay ganito,
num count[998]={0}
ibig sabihin, the entire array is 0

kase yung array na mismo bahala magbigay sakanya ng memory location siya, which is sunod sunod naman (yung index)
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:24 pm
Eh paano po ma’am kapag sa pseudo-code na siya ilalagay? Same lang po kapag dineclare na?

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:31 pm
LouiseSebastianeYagi wrote:Eh paano po ma’am kapag sa pseudo-code na siya ilalagay? Same lang po kapag dineclare na?

Sent from Topic'it App

Yan na yung sabi ko kanina, sa flowchart, ganung way lang naten siya idedeclare.
Nakadepende na sa programming language mo kung paano sila magdeclare ng arrays.
Example, sa ginamit ko before, C++ ang language namen, ang pag declare ko ng array ay
int count[998]={0};
ibig sabihin niyan, may array size ako na 998 pero ang laman lahat ay zero lng.
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:45 pm
Okay po ma’am. Medyo nagegets ko na po. Onting hasa nalang po at makukuha ko din po.

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:47 pm
LouiseSebastianeYagi wrote:Okay po ma’am. Medyo nagegets ko na po. Onting hasa nalang po at makukuha ko din po.

Sent from Topic'it App

Hahaha kung may further question pa, pwede pa naman tsaka pwede ko pang linawin yung topic sa forum na toh sa tagalog kung pwede Smile
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 7:53 pm
Hahaha! Sige po ma’am. Maghahanap pa po ako na pwedeng i-clarify para mas maintindihan ko po.

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 8:00 pm
LouiseSebastianeYagi wrote:Hahaha! Sige po ma’am. Maghahanap pa po ako na pwedeng i-clarify para mas maintindihan ko po.

Sent from Topic'it App

okay sige sige Smile
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 8:05 pm
May thank you point ka po sakin ma’am. HAHAHAHAHA! Joke. 😂 Thank you for the clarifications ma’am!

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 24
https://iramaecomp.forumotion.com

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 8:22 pm
LouiseSebastianeYagi wrote:May thank you point ka po sakin ma’am. HAHAHAHAHA! Joke. 😂 Thank you for the clarifications ma’am!

Sent from Topic'it App

Hahaha thank you dinnn
Sean Monacillo
Sean Monacillo
Journeyman
Posts : 7
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:06 pm
LouiseSebastianeYagi wrote:Ma’am is it possible that an array can exist within a list?

Hmmm hindi ata pwede pre . i think kasi kung iisipin anggulo 😂

Sent from Topic'it App
Sean Monacillo
Sean Monacillo
Journeyman
Posts : 7
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:08 pm
Ma'am may limit po ba sa paglalagay ng array sa isang program ?

Sent from Topic'it App
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:10 pm
Alam ko pre walang limit eh. Kasi naka-depende sa logic na hinihingi yung limit ng array mo.

Sent from Topic'it App
Sean Monacillo
Sean Monacillo
Journeyman
Posts : 7
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:14 pm
LouiseSebastianeYagi wrote:Alam ko pre walang limit eh. Kasi naka-depende sa logic na hinihingi yung limit ng array mo.

so it means dipende parin sa program na gagawin or sa problem na gagawin tama ba pre ?

Sent from Topic'it App
avatar
justjoking10
Expert
Posts : 13
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:18 pm
Sean Monacillo wrote:
LouiseSebastianeYagi wrote:Alam ko pre walang limit eh. Kasi naka-depende sa logic na hinihingi yung limit ng array mo.

so it means dipende parin sa program na gagawin or sa problem na gagawin tama ba pre ?

Sent from Topic'it App

Tama pre. Pero iniiwasan ata ang sobrang laking array.
avatar
justjoking10
Expert
Posts : 13
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:19 pm
LouiseSebastianeYagi wrote:Alam ko pre walang limit eh. Kasi naka-depende sa logic na hinihingi yung limit ng array mo.

Sent from Topic'it App

D ko sure ahh. Pero parang may sinabi si maam n limit ng number n pwede mo lng daw ilagay ehh. Trillion ata. Not sure pero ibang lesson p daw un.
avatar
justjoking10
Expert
Posts : 13
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:21 pm
Sean Monacillo wrote:
LouiseSebastianeYagi wrote:Ma’am is it possible that an array can exist within a list?

Hmmm hindi ata pwede pre . i think kasi kung iisipin anggulo 😂

Sent from Topic'it App

I think possible ehh. Pero parang ang useless ng ganon. Kc may variable na nag rerepresent s list. Mas madali un gawin kasya s list within an array. Reply nlng pre pag hindi malinaw.
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:23 pm
Oo pre. Pero dun sa explanation ni Ma’am about sa [998]={0} hindi ka na halos mag-aabala about sa dami ng array na ilalagay mo.

Sent from Topic'it App
avatar
justjoking10
Expert
Posts : 13
Join date : 2018-08-02

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:44 pm
LouiseSebastianeYagi wrote:Oo pre. Pero dun sa explanation ni Ma’am about sa [998]={0} hindi ka na halos mag-aabala about sa dami ng array na ilalagay mo.

Sent from Topic'it App

Short method ung Array[998]. Pero walang list don s loob ng array.
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 24

What is an Array? Empty Re: What is an Array?

Thu Aug 02, 2018 9:48 pm
Baka kaya walang list kasi type of list na yung Array. Opinion ko lang.

Sent from Topic'it App
Sponsored content

What is an Array? Empty Re: What is an Array?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum