answersLogoWhite

0

No, the int variable uses less memory, and therefore it is preferable to use an int rather than a double where you can.

A boolean variable uses even less memory, but obviously is useful only in limited circumstances.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Why is it important to allocate the correct type of data?

It is important to use the correct data type so you dont get confused and makes it easier for the system to Calculate numbers, and when text is text. For example Windows Excel wouldnt be able to calculate the data if it wasnt for using the correct data type


Memory is empty but it says memory full in data c?

You have one or more errors in your program.


Comparison of all algorithms in data structures?

Arrays are datastructures which use continguous memory , and data allocation happens at compilation, so it is faster in execution . similarly in stacks and queue. The memory usage is lesser compared to other data type as it does not require pointers. It is fixed memory allocation so cannot be used until u are sure about the size of the data. Moreover if u do a wrong estimation about the size of data required then can lead to memory shortage or if declared more then it leads to Memory wastage.Searching can be easy in arrays,stacks and queues,however insertion and deletion is quite difficult in these data structures. Searching can also be easy in binary trees as data is sorted and stored . Accessing data is faster here as it allows random access to data.In arrays u can use only one type of data. Linked list, graphs, trees are non continguous memory ,i.e they use heap memory. Here data is allocated in run time so execution may take more time compared to above, As data is allocated in run time u will also need memory allocator to keep track of available memory and allocate them. Memory usage is also more as we each node has to have the additional info about the address of the next data.so its time consuming compared to above. As the size of data is not fixed can be used in programs where we are not aware of size of data before execution. Here data is sequencially accessed which means accessing data is slow .to access 30th element u will have to traverse through 30 elements. However data insertion and deletion is faster all that we need to do is change address of the pointer. There is no memory wastage here as memory is not stored for this but its more flexible. Here u can store different data types unlike arrays. - Shruthi.B.O


What are the advantages of memory chips?

They make sure you dont lose your work and they help you to store more data


What are the limitation of object oriented programming language?

Performance (since the generated code is much more than when working procedural)Memory (more memory is needed to store code and data)

Related Questions

What is the use of paged memory?

Paged memory is used to extend the real physical memory of the machine by copying blocks of data from the memory to a drive. That way you can run many programs simultaneously even if they consume more memory than you physically have in your computer. When a program requires to access the data that is "paged to disk" the operating system will read this data into memory.


Why is it important to allocate the correct type of data?

It is important to use the correct data type so you dont get confused and makes it easier for the system to Calculate numbers, and when text is text. For example Windows Excel wouldnt be able to calculate the data if it wasnt for using the correct data type


What is role of cache memory in microprocessor what are the typical cache capacities of p4 processor?

Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory.


Memory is empty but it says memory full in data c?

You have one or more errors in your program.


What is the way data is stored in the Windows OS?

Data is stored on the hard disc. The more memory hard disc has the more data can be stored.


What is a single and double sided memory?

Single-sided memory has memory chips on only one side of the module, while double-sided memory has memory chips on both sides. Double-sided memory typically has a higher memory capacity than single-sided memory due to more chips being present.


How do you fix your minecraft data problem?

By getting more memory space.


How Much Memory For A Desktop Computer?

It depends wildly based on the computer. Typically, most modern x86 processors have 128 KB of L1 (64 KB of Instruction Cache, and 64 KB of Data Cache) The L2 memory varies, but in modern Intel and AMD is typically between 2MB and 8MB, but may be as little as zero or as much as 16 MB. In non-x86 computers, it can vary even more, to as much as 128MB for specialty supercomputer processors. L3 cache varies even more.


What is internal dynamic memory?

A way or organizing different types of data in the phone's memory. Also referred to as Shared memory. Dynamic memory means that all types of data are stored in the same memory (there is no separate memory for photos, ringtones etc.). An advantage of dynamic memory over partitioned memory is that it is more flexible - with partitioned memory, you can fill up the photo memory for example and you won't be able to take any more photos even if other types of memory are free.


What is special high speed memory that allows the processor to access data more rapidly than from memory located elsewhere on the system board?

cache memory


What are the Functions of the memory buffer register?

In other words, MAR holds the memory location of data that needs to be accessed. When reading from memory, data addressed by MAR is fed into the MDR (memory data register) and then used by the CPU. When writing to memory, the CPU writes data from MDR to the memory location whose address is stored in MAR. The Memory Address Register is half of a minimal interface between a microprogram and computer storage. The other half is a memory data register. Far more complex memory interfaces exist, but this is the least that can work.


Does A more narrow bus streamline the data?

No. A more narrow bus serves to reduce throughput, as it requires more bus transactions to move the same amount of data.