ineedhelpnow
- 649
- 0
whats an array for?...whats a vector for? what do they do? what purpose do they serve?
Last edited:
The discussion revolves around the concepts of arrays and vectors, exploring their definitions, purposes, and applications in programming. Participants express confusion about their usage and distinctions, particularly in coding contexts.
Participants express varying definitions and understandings of arrays and vectors, indicating that there is no consensus on their usage and significance in programming.
Some definitions and examples provided may depend on specific programming languages or contexts, and there is uncertainty regarding the practical use of arrays in coding.
ineedhelpnow said:whats an array for?...whats a vector for? who do they do? what purpose do they serve?
ZaidAlyafey said:Arrays are a collection of data. It holds a sequence of information indexed using natural numbers. Vectors are like those in mathematics. They have specialized operations like adding , scalar-multiplication and so on.
Usually we use arrays and vectors to store data that share a certain property. For example , the students in a class , a finite subset of even numbers , list of books on a library. Most of the time , the size of an array is fixed once declared. Arrays , are mostly used in graphics and gaming.