answersLogoWhite

0

A Vector can store any objects, so yes.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Rearrange the string in alphabetical order in two dimensional character array?

Use a std::vector<std::string>> to store the strings, then call the std::vector::sort() method.


What is the difference between the 'str' and 'snp' data types in programming languages?

The 'str' data type is used to store text or string values in programming languages, while the 'snp' data type is not a standard data type in most programming languages. It is possible that 'snp' could be a custom or user-defined data type specific to a certain programming environment or framework.


What are variables in 3 words?

Variables are placeholders for values. They can change or vary. In programming, they store data.


How do you hold values in C programming?

You hold values by storing them in variables. If you need to hold values between executions, store them in non-volatile memory, such as a disk file.


What do you mean by vectors only hold objects not primitive data types?

It means that you can only store values like Integer, String etc in a Vector and not values like int, float etc. int, float, double etc are primitive data types. collections by their default behavior can hold only objects and not primitives.


How much memory is required to store a 'character' and how much is required to store a 'string'?

a character/byte as defined in the C programming language is one byte (8 bits). A string can be as short as one byte and can be as long as the physical memory limits can contain it.


What purpose do strings serve in programming?

Strings are a type of variable in computer programming. Simply put, they contain multiple characters which are "strung" together to make a piece of text. "Test", "House", and "Hello World!" are all excellent examples of what might be contained in a string. As a result, strings are used to store and convey any textual information.


What is the purpose of the head string pool in a programming language and how does it impact memory management?

The purpose of the head string pool in a programming language is to store and manage commonly used string literals in memory. This helps reduce memory usage by reusing the same string objects instead of creating new ones every time they are used. This can improve memory management by reducing the amount of memory allocated for storing duplicate string literals, leading to more efficient use of memory resources.


In C programming a character variable can at a time store how many characters?

You can store one, however if you make a char array: char[50]; You can make a string out of your array of characters.


Can you explain the difference between pointers and variables in programming languages?

In programming languages, variables are used to store data values, while pointers are variables that store memory addresses of other variables. Variables directly hold data, while pointers hold the location of where data is stored in memory.


What is Vector object?

A Vector object in programming is a data structure that can store a dynamically resizable collection of elements. It automatically adjusts its size to accommodate new elements and provides methods to manipulate and access these elements efficiently. Vectors are commonly used in languages like Java to create resizable arrays.


How does one use JavaScript arrays?

JavaScript arrays is used to generalize multiple values of data and store them in a single variable. This is a useful software in most programming languages.