answersLogoWhite

0


Best Answer

It's not clear from the question what you mean by "work". However character data types (char and wchar_t) are intended to store character codes and they work exactly the same whether as a single variable or as an array of characters. If you want to use the array as a string, however, remember to include a null-terminator at the end of the string.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you work character type data in array c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is java string?

array of character data type which is terminated by null character


What type of data deals with descriptions?

Descriptions are best represented using a character array (string) data type.


Can an integer data type in c plus plus stores character value?

no


Application of array in data structure?

That rather depends on the underlying type. For any given type T, an array of type T is user-defined if T is user-defined, otherwise it is built-in. For example: #include<string> // required to use std::string std::string s[42]; // user-defined array int i[42]; // built-in array Here, s is a user-defined array because std::string is a user-defined type, whereas i is a built-in array because int is a built-in type.


What is the improved array definition?

An array is used to store data having the same data type.


What data type can be used to represent 1000000 elements in an array?

An array.


What is array Explain with syntax?

an array is a collection of the same data type.


C plus plus Defines a constant MaxSize equal to 20 Defines array Data whose base type double MaxSize elements Initializes the array Data so that each element is initialized to the square of its index.?

#define MaxSize (20) double Data[MaxSize]; int i; for (i=0; i<MaxSize; i++) Data[i] = i*i;


Can you store non primitive data type in the array list?

Yes you can store non primitive data type variables in an array. String is a non primitive data type. You can declare a string array as: String a[]=new String[10];


Should element in an array must be of primitive data type?

No, it can be array, structure or union as well.


An array is a list of data items that all have the same type and the same name?

An array element has the same type as the array name.


What type of storage can store similar type of data?

array