answersLogoWhite

0

#include <stdio.h>

static int statv;

int main (void)

{

int localv;

printf ("static at %p, automatic at %p\n", &statv, &localv);

return 0;

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Math & Arithmetic
Related Questions

What is the purpose of storing a program in memory?

Anything stored in memory can be accessed much faster than items stored on the harddrive. This is basically because of the physical composition of memory chips which allows for much faster data-transfer. The tradeoff is the amount of space that memory provides, and the number of programs that end up sharing the memory. So, when a program is stored in memory, its execution is much faster. However, if a program exists ONLY in the memory, and does not store any data on the primary disk, then when you exit a program, all your data will also be destroyed due to active memory management that takes place. Data will not persist when program exists. Hence, you will need to write the data to a file on the hardisk which can be accessed later and loaded into the memory next time when the program runs.


What is the difference between program counter and memory address register?

The program counter (PC) is a register that holds the address of the next instruction to be executed in a program sequence, effectively guiding the flow of execution. In contrast, the memory address register (MAR) is used to store the address of a memory location that the CPU wants to read from or write to, acting as an intermediary during memory operations. While the PC tracks instruction flow, the MAR focuses on memory access for data and instructions. Both play crucial roles in the CPU's operation but serve distinct purposes.


What is the memory write operation?

read/write permissions/privileges allow the user to read, append and delete records from your database tables, however it cannot alter / create / drop the tables and its structures.Read/write privileges are ideal for forums and production websites that don't require creation or alteration of table structures on its normal operations.


Write a program to find out the address of an element in an array?

== Java does not allow reference to memory locations. == In C: for (i=0; i&lt;n; ++i) printf ("a[%d] is at %p\n", i, &amp;a[i]);


Write a short note on primary memory?

Primary memory is where information is stored after it is first learned. It is also referred to as the short term memory.


How do you write welcome address for induction program?

yes


Why memory is divided in even and odd banks in 8086 microprocessor?

in 8086 there is 20 bit address bus,so it can address 1,048,576 address. At each address we can store 8 bit address (1-byte)but if want to write a word(16-bit)into a memory segment to store data in byte form then we write the data in two consecutive memory address which are even(low) and odd(high) memory.


What s d highest prime number that could be stored on a 7 bit computer?

In a single 7-bit unit, the maximum number that can be stored is 27- 1 = 127, which also happens to be a prime. However, multiple memory locations can be used (one of my first year maths degree units required me to write a program to calculate all the digits of 23000 using an 8-bit computer, the CBM Pet 3032). Assuming a 7-bit computer uses 2 x 7-bits for memory addressing, giving an address space of 214 = 16384 (7-bit) memory locations, the largest Mersenne prime that could be stored would be 2110503 - 1 (requiring 110503 bits, or 15,787 (7-bit) memory locations). By use of memory paging, more memory than can be directly address an be accessed and so an even larger prime could be stored, but the exact prime would be dependent upon the amount of memory added.


Is ram write only memory?

One can read and over-write data in RAM.It allow stored data to be accessed in any order with a worst case performance of constant time.It is volatile types of memory,where its stored information is lost if the power is removed.


What is the functional of a bus?

The bits of address bus inform the memory(Ram) which particular element is to be read or write in memory.


What is a correct way to write the value 0xaa55 to physical memory address 0x67a9?

To write the value 0xaa55 to the physical memory address 0x67a9, you would typically use a direct memory access method in a programming language that supports low-level memory manipulation, such as C or assembly. For example, in C, you might use a pointer: *(volatile unsigned short *)0x67a9 = 0xaa55;. This ensures that the value is written directly to the specified address in memory. Remember to ensure that you have the necessary permissions and that the memory address is valid for your system.


Access violation at address 00402520 in module 'pprotocolo exe' read of address?

The error message &quot;Access violation at address 00402520 in module 'pprotocolo exe'&quot; indicates that the program attempted to read or write to a memory address that it is not allowed to access, leading to a crash. This typically occurs due to issues such as dereferencing null or invalid pointers, buffer overflows, or accessing memory after it has been freed. To resolve this, you may need to debug the application to identify the faulty code or memory management issues, and ensure proper error handling and memory allocation practices are in place.