answersLogoWhite

0


Best Answer

Three:

'

n

'

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

gace pro

Lvl 2
3y ago

1

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many bytes are needed to store 'n'?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What function allocate n bytes in heap memory?

malloc


How many bytes are required to store an address of an integer?

32 bits or 4 bytes. This depends heavily on the processor architecture your computer uses, AND the programming language you are using. Typically, an integer is 1 word in length, however that processor architecture defines "word". That could be 32-bits (4 bytes), 64-bits (8 bytes), 8-bits (1 byte), or even 9 bits (in certain old computers).


How many bytes are required to store the pointer?

It depends on the platform... In a 16 bit environment, such as DOS or Windows 3.x, a near pointer is two bytes, while a far pointer is 4 bytes. In a 32 bit environment, such as Win32, a pointer is 4 bytes. In a 64 bit environment, such as Win64, a pointer is 8 bytes. If you want to find out in your particular environment, look at sizeof(ptr), where ptr is declared as a pointer to something. char* ptr; std::cout << sizeof(ptr) << std::endl; Note that the size of the pointer is not the same as the size of the object to which it points. If you looked at sizeof(*ptr), you would get 1.


What is an adequate measure of the size of input for a program that requires two integer numbers n?

Not sure what you mean; if you want to measure the "input size" in bytes, that would probably be 8 bytes, since integers typically use 4 bytes.


How an array is created in c?

For any type T, the type T[n] is an array of n Ts. If n is known at compile time, the array is fixed-length and the compiler will allocate n * sizeof(T) bytes to the array name. If n is not known at compile time, the array is variable-length and the programmer must manually request n * sizeof(T) bytes from the system at runtime, storing the start address in a pointer. The programmer must keep track of the stored address at all times and must release the memory as soon as it is no longer required.

Related questions

How many bytes are required to encode n bits of data where n equals 17?

1 bytes is 8 bits so (17/8) = 2.125 so round up to 3 full bytes


How many bytes are required to encode n bits of data where n equals 4?

One byte is 0.125 to 1 bit. So 4 bits, is .5 bytes.


What is billion bytes on a hard disk?

On a flash drive, one billion bytes is called a(n) _____________.


What function allocate n bytes in heap memory?

malloc


How many bytes are required to store an address of an integer?

32 bits or 4 bytes. This depends heavily on the processor architecture your computer uses, AND the programming language you are using. Typically, an integer is 1 word in length, however that processor architecture defines "word". That could be 32-bits (4 bytes), 64-bits (8 bytes), 8-bits (1 byte), or even 9 bits (in certain old computers).


How many numbers can be represented by 2 bits?

4, which is equal to 2 to the power 2.In general, with "n" bits, you can have "2 to the power n" different states (or represent that many different numbers).


How many exchange needed for reverse an array of n elements?

the integer of 1/2 n


How many address lines are needed to access 256KB of main memory?

The number of address lines needed to access N-KB is given by log2N Then the number of address lines needed to access 256KB of main memory will be log2256000=18 address lines.


How many bytes are required to store the pointer?

It depends on the platform... In a 16 bit environment, such as DOS or Windows 3.x, a near pointer is two bytes, while a far pointer is 4 bytes. In a 32 bit environment, such as Win32, a pointer is 4 bytes. In a 64 bit environment, such as Win64, a pointer is 8 bytes. If you want to find out in your particular environment, look at sizeof(ptr), where ptr is declared as a pointer to something. char* ptr; std::cout << sizeof(ptr) << std::endl; Note that the size of the pointer is not the same as the size of the object to which it points. If you looked at sizeof(*ptr), you would get 1.


What is an adequate measure of the size of input for a program that requires two integer numbers n?

Not sure what you mean; if you want to measure the "input size" in bytes, that would probably be 8 bytes, since integers typically use 4 bytes.


How many bytes does a string occupy in c?

Depends on several factors:number of bytes per character: 1 to 4 depending on which alphabet and character encoding you use. 1 byte per character for US-ASCII and the most common Western Europe encodings.length of the string: bytes per character times number of charactersprogramming language: in C, the string takes up no more space than the characters do. In many other languages, there is an additional fixed overhead for the string object itself. For example in Java, a string takes 2-4 bytes plus the space taken by the characters.


Algebra question A jar holds n ounces of jam How many jars are needed for 200 ounces of jam?

You will need to specify n=