Exam4Training

What is a vector in computer programming?

A vector in vector calculus is a quantity that has magnitude and direction.

What is a vector in computer programming?
A . An array with one dimension.
B. A two-dimensional array of scalars.
C. An array of complex numbers
D. A constant

Answer: A

Explanation:

In computer programming, a vector is a data structure that contains a collection of elements that are all of the same type. Each element in the vector has an associated index, which can be used to access and modify the element at that index.

Vectors are commonly used to store collections of numerical values (e.g., integers or floating-point numbers) or strings, but they can also be used to store any type of data.

References:

[1] BCS Foundation Certificate In Artificial Intelligence Study Guide, Page number 36

[2] APMG International, “What is a Vector in Computer Programming?”, https://apmg-international.com/en/blog/what-is-a-vector-in-computer-programming/

[3] EXIN, “What is a Vector in Computer

Programming?”, https://www.exin.com/blog/what-is-a-vector-in-computer-programming/

Exit mobile version