answersLogoWhite

0


Best Answer

A single-byte type of array has 1 byte per character; a wide-character array has 2 bytes per character of storage. Without seeing the exact definition it cannot be determined what the actual size of the array would be.

User Avatar

Wiki User

βˆ™ 14y ago
This answer is:
User Avatar
More answers
User Avatar

Jerry Run

Lvl 2
βˆ™ 3y ago

β€œHello World!”

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many bytes are occupied by declaring following array of characters?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is it necessary to specify dimension while declaring an array?

yes


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.


What elements are in string?

A string is an array of characters.


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 the correct syntax for declaring and initializing an array that contains the numbers 0-9?

int x[]={0,1,2,3,4,5,6,7,8,9};


How many bytes occupied for arrays?

It all depends on the length and data type of the array...


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


What is a sequence of characters?

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


What is syntax in c plus plus for declaring a variable?

type variable {[optional array size]} {= optional initializer};


What is meant by the term array?

Arrays are objects in Java that store multiple variables of the same type. Arrays can hold either primitives or object references, but the array itself will always be an object on the heap, even if the array is declared to hold primitive elements. In other words, there is no such thing as a primitive array, but you can make an array of primitives. Arrays are declared by stating the type of element the array will hold, which can be an object or a primitive, followed by square brackets to the left or right of the identifier. Declaring an array of primitives: int[] Values; // brackets before name (recommended) int Values []; // brackets after name (legal but less readable) // spaces between the name and [] legal, but bad Declaring an array of object references: Ferrari[] Ferraris; // Recommended Ferrari Ferraris[]; // Legal but less readable When declaring an array reference, you should always put the array brackets immediately after the declared type, rather than after the identifier (variable name). That way, anyone reading the code can easily tell that, for example, Values is a reference to an int array object, and not an int primitive.


Is an array is a collection of characters that can be fixed or variable?

No. An array is a collection of objects of any type, such as doubles, not just characters. You can even have arrays of arrays, or arrays of structs. In C, the size of an array is fixed, but it is possible to write code that will allow you to manually make it variable in size.


What is the correct syntax for declaring and initializing an array that contains the numers 0-9?

The syntax is: int a[10]; for (int i=0; i<10; ++i) a[i]=i;