Question

For C programming How many bytes are allocated in memory to the following line of code:...

For C programming

How many bytes are allocated in memory to the following line of code:

double x = -1.75

A) 4

B) 8

C) 16

D) 32

E) 64

0 0
Add a comment Improve this question Transcribed image text
Answer #1

in C every double type reserves 8 bytes of memory of 64 bits where as float type reserves 4 bytes or 32 bits of memory.

Add a comment
Know the answer?
Add Answer to:
For C programming How many bytes are allocated in memory to the following line of code:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • a) A memory unit has 28-bit address lines and 64-bit input/output data lines. How many bytes...

    a) A memory unit has 28-bit address lines and 64-bit input/output data lines. How many bytes of data can this memory hold? How many words does it contain, and how large is each word? b) A memory unit consists of 32M words of 16-bit each. How many bits wide address lines and input-output data lines are needed to access this memory? c) A memory unit consists of 512K bytes of data. How many bits wide address lines are needed to...

  • How mant bytes of on-chip program memory does the PIC24HJ128GP502 ANSWER: microcontroller have? 2048 b)128K 65536...

    How mant bytes of on-chip program memory does the PIC24HJ128GP502 ANSWER: microcontroller have? 2048 b)128K 65536 a24 none of the above How many bytes of Random Access Memory does the PIC24HJ128GP502 ANSWER: microcontroller have? 2048 b)32768 e)16 d24 none of the above .The PIC24HJ128GP502 data memory is non- volatile ANSWER: TRUE b) FALSE What is the machine code (in hex) for the mov.b w1,w2 instruction? ANSWER: 0x780082 b)0x784082 0x780101 0x784101 d' none of the above How mant bytes of on-chip...

  • How many bytes does a 64 KB microprocessor memory contain? Note: 1 KB = 2^10 bytes...

    How many bytes does a 64 KB microprocessor memory contain? Note: 1 KB = 2^10 bytes 1 MB = 2^20 bytes 1 GB = 2^30 bytes

  • Suppose that we have an L1 cache of this configuration: Block size 32 bytes Number of...

    Suppose that we have an L1 cache of this configuration: Block size 32 bytes Number of sets 64 Associativity = 1 Capacity-2048 bytes What is the cache miss rate (as a percentage) when we execute the following C code? Assume that the grid data structure is aligned on a cache block boundary in memory and that the cache contains no valid lines initially. struct double x; double y; grid[16] [16]; forCi = 0; i < 16; i++) for(j 0; j...

  • For a given computer system, the main memory is 256Mbyte; word size is 4 bytes; block...

    For a given computer system, the main memory is 256Mbyte; word size is 4 bytes; block size is 64 bytes; cache size is 64 Kbytes. what is the number of cache line? Question 3 options: A 64Kbyte/4bytes B 256Mbyte/4bytes C 256Mbyte/64bytes D 64Kbyte/64bytes Question 4 (3 points) Consider a magnetic disk drive with 8 double sided platters, 2000 tracks per disk surface. Each track has a capacity 2048 KBytes. Sector size is 2KBytes. What is the capacity of acylinder? Question...

  • Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of...

    Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of cache, and a block size of 16 bytes. For each configuration below, determine the memory address format, indicating the number of bits needed for each appropriate field (i.e. tag, block, set, offset). Show any relevant calculations. Direct cache mapping and memory is byte-addressable a) Direct cache mapping and memory is word-addressable with a word size of 16 bits b) c) 2-way set associative cache...

  • Suppose we have 2^20 bytes of virtual memory and 216 bytes of physical main memory. Suppose...

    Suppose we have 2^20 bytes of virtual memory and 216 bytes of physical main memory. Suppose the page size is 2^8 bytes. a) How many pages are there in virtual memory? b) How many page frames are there in main memory? c) How many entries are in the page table for a process that uses all of virtual memory?

  • Assuming shorts are 2 bytes long, and pointers are 8 bytes long, how many bytes does...

    Assuming shorts are 2 bytes long, and pointers are 8 bytes long, how many bytes does this program need? short a = 3; short b = a; short * c = &a; *c = b++; short & d = a; short & e = b; short * f = c; e = *f + d; (a) 0 (b) 4 (c) 8 (d) 12 (e) 16 (f) 20 (g) 24 (h) 28 Please confirm. My answer: (f) 20 short a =...

  • 1. How many bytes are allocated in total for the variables (va, vb, vc, vd, and...

    1. How many bytes are allocated in total for the variables (va, vb, vc, vd, and ve)? 2. For each of the instructions highlighted (boldface), derive the effective address of the memory variable (source) if any memory variable is involved, and the contents of the register a or d (whichever one involved) right after the instruction is executed. Answer in hexadecimal. Assume that all bytes in the variables va, vb and vc are initially zero. $0800 RAMStart EQU EQU ROMStart...

  • Consider a cache of 8 lines of 16 bytes each. Main memory is divided into blocks...

    Consider a cache of 8 lines of 16 bytes each. Main memory is divided into blocks of 16 bytes each. That is, block 0 has bytes with addresses 0 through 15, and so on. Now consider a program that accesses memory in the following sequence of addresses: Loop three times: 10 through 20; 32 through 52. Once: 20 through 35. Suppose the cache is organized as direct mapped. Memory blocks 0, 8, 16 and so on are assigned to line...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT