answersLogoWhite

0

Can object have array of characters?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

If by an object you mean a class or a struct, yes they can. Define the char array like you normally would but don't intialize any data into it. Do this in the constructor

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How strings and characters are represented in an array?

An array of characters is an array of character codes (such as ASCII codes). A string is typically a null-terminated array of characters however some languages use the first array element to specify the string's length.


Why object array called universal array?

Object array is called universal array because it can store multiple variables of the same type


What are the different between array and variables?

A variable is a reference to a single object (often a number, character, or string of characters). An array is a reference to a contiguous block of memory in which zero or more individual objects.


How delete an array of object within the object in C?

First locate the position of an array by search after than use a delete function to delete an array


How will you find the location of an element of an array?

Basically, &array[i]; That is, the memory location for an array object with index i. Or, you can do: (array + i);


How do you use character in c plus plus?

If you are referring to the character object 'char,' then here are a couple of uses:To create an object, use this:char object = 'a';To create an array of chars, use this:char array[10];To dynamically allocate an array of chars, use this:char array = new char[10];(Don't forget to delete the object with 'delete [] array')


What is javascript array object?

An object in JavaScript is anything that holds information. Arrays, strings, numbers and booleans are all objects. You can then use methods and functions to manipulate those objects. If you want to know more about objects, see the related links.


What elements are in string?

A string is an array of characters.


What are the different issues if a string is implemented as a primitive or as a character array?

Even in languages where string is a type, it is still an array of characters. A computer can not represent a string as a primitive type. That said, the difference between using the programming language string object or an array or list if characters will differ based on language. Though in most languages which offer a string type, it would mean that you'd have to implement all the functions provided for you by the type on your own. A string object class simply provides a series of utility functions to manipulate a character array within.


What is the difference between array and string of array?

When we declare an array of characters it has to be terminated by the NULL , but termination by NULL in case of string is automatic.


What is a sequence of characters?

A sequence of characters is an array of type char, commonly known as a string.


Can you modify the bubble sort algorithm to search to sort an array of characters instead of array of integers?

The bubble sort algorithm can be applied to an array of characters. Every character can be translated to an integer equivalent via the ascii table