Question

In: Computer Science

Question 1. which of the of the following statement(s) is(are) correct?         (a) Volatile memory loses...

Question 1. which of the of the following statement(s) is(are) correct?

        (a) Volatile memory loses all data when power is removed, but is easy to write to.

        (b) DRAM needs to be accessed every few microseconds to refresh the charges, otherwise the information is lost.

        (c) The storage of program usually requires nonvolatile memory.

        (d) Each memory cell cost more in SRAM than DRAM.

        (e) EPROM is electrically programmable but EEPROM is not electrically programmable.

Question 2. The mbed use a specific hardware communication interface other than any of the communication protocols such as SPI, I2C, UART, etc.

       (a) True

       (b) False

Question 3. We have the following C++ code in a function main():

   string str_a = "ABCDE" ;

   string str_b = "XYZUV" ;

   string str_c = "TAMU" ;

   string * ptr1 = NULL;

   string * ptr2 = &str_b ;

   ptr1 = &str_a ;

   ptr1 = &str_c ;

   cout << *ptr1 << endl;

   cout << ptr1 << endl;

   cout << *ptr2 << endl;

   cout << ptr2 << endl;

What would be displayed when the above code segment is executed?      

(a)

NULL

{the address of str_a}

XYZUV

{the address of str_b}

                                             

(b)

{the address of str_a}

ABCDE

{the address of str_b}

                                             

(c)

ABCDE

{the address of str_a}

XYZUV

{the address of str_b}

                                             

(d)

TAMU

{the address of str_c}

XYZUV

{the address of str_b}

                                               

(e)

ABCDE

XYZUV

{the address of str_a}

{the address of str_b}

                                             

(f)

TAMU

{the address of str_c}

ABCDE

{the address of str_a}

                                             

(g) None of (a) through (f) is a correct answer.

Question 4. the fseek() function can move the file point when reading data from a file. Assume that the original example.txt reads the following:

This is an apple.

After the execution of the following line, what would the file example.txt contain?

  FILE * pFile;

pFile = fopen ( "example.txt" , "wb" );

fseek ( pFile , 10 , SEEK_SET );

fputs ( " sam" , pFile );

       (a) This is an apple.

       (b) This is a sample.

       (c) This is an samle.

       (d) This is an sample.

       (e) None of (a) through (d) is the correct answer.

Question 5. what are the fundamental differences between SRAM and DRAM type memory?

Question 6. give the C/C++ code that defines an empty 5 element array called dataarray and a pointer called datapointer which is assigned to the first memory address of the data array.

Solutions

Expert Solution

Ans 1) Correct statements

a) Volatile memory loses all data when power is removed, but is easy to write to.

Volatile memory is computer storage that only maintains its data while the device is powered.Most RAM (random access memory) used for primary storage in personal computers is volatile memory. RAM is much faster to read from and write to than the other kinds of storage in a computer, such as the hard disk or removable media. However, the data in RAM stays there only while the computer is running; when the computer is shut off, RAM loses its data.

b) DRAM needs to be accessed every few microseconds to refresh the charges, otherwise the information is lost.

dram consist of only one transistor and then it is a
volatile memory.it is refreshed periodically otherswise
stored informations are deleted.

(c) The storage of program usually requires nonvolatile memory.

Non-volatile memory is typically used for the task of secondary storage, or long-term persistent storage.

d) Each memory cell cost more in SRAM than DRAM.

SRAM (Static RAM)
Data is stored in cross-coupled inverters
Large cell - requires several transistors (6T cell standard)
Fast access time / Low density
Integrates easily into logic fab processes

Ans 2)true

usb port enables communication

Ans 3) g)

none is the correct answer.

its going to show an error since both sr_a str_c are equal to *ptr1

Ans4) This ia an sample.

Ans 5) SRAM
>Short for static random access memory, and pronounced ess-
ram.
>SRAM is a type of memory that is faster and more reliable
than the more common DRAM
>SRAM's store bits (1's or 0's) in memory cells that are
basically flip flops.To store 1 bit of information about 6
transistors are used
>it does not required refreshing
>it is more costlier than DRAM in terms of cost per bit,


DRAM
>DRAM stands for dynamic random access memory, a type of
memory used in most personal computers

>In DRAM to store 1 bit of information 1 transistor and 1
capacitor is used.
>The information is stored in the capacitor in form of
charge, so it required refreshing to retain the charge or
data in the capacitor.


Related Solutions

Which of the following statement(s) is correct?
Which of the following statement(s) is correct?Cash flows are conventional when there are no cash inflows prior to a cash outflow.In terms of shareholder wealth maximization in the context of mutually exclusive projects, the project with the higher IRR is not necessarily better than the project with the lower IRR.Financing matters for valuation, but is typically ignored in determining cash flows in capital budgeting.a. All three are falseb. Only 1. is correctc. All three are correctd. Only 2. is correcte....
QUESTION 1 Which of the following statement is CORRECT about normalisation? A database that is not...
QUESTION 1 Which of the following statement is CORRECT about normalisation? A database that is not in at least third normal form cannot be implemented with MySQL. A database that is only in first normal form would breach the CAP theorem. Normalisation ensures consistent formatting, for example, that all the phone numbers would have the same number of digits. All of the above. None of the above. 0.5 points    QUESTION 2 Complete the four blanks in the following SQL...
Question text Which of the following statement(s) is correct? (x)   Deadweight loss measures the loss in...
Question text Which of the following statement(s) is correct? (x)   Deadweight loss measures the loss in a market to buyers and sellers that is not offset by an increase in government revenue. (y)   The imposition of a tax on a good raises the price that buyers effectively pay, but lowers the price that sellers effectively keep. (z)   When the government places a tax on a good, the loss of consumer surplus and producer surplus to buyers and sellers is more...
Which of the following statement is correct?
Which of the following statement is correct?DJIA is not value weightedNone of the aboveIf the Efficient Markets Hypothesis is NOT true, all stocks are correctly pricedCommon shares is not a financial assetCommon shares is not a financial assetWhich of the following statement is NOT correct?None of the abovePrice Impact is not a trading cost for investors when trading common stocksThere is a decrease in number of IPOs after 200012b-1 Fee is not a trading cost for investors when trading common...
QUESTION 7 Determine which of the following statement below are correct. Multiple statements may be correct....
QUESTION 7 Determine which of the following statement below are correct. Multiple statements may be correct. A firm's production function is equal to Q = K^(1/2) L^(1/2) and the Marginal Product of Labor is equal to: MP(L) = 1/2 * K^(1/2) * L^(-1/2) Capital is currently fixed at 81 units. Labor increases from 100 units to 256 units. As a result, the Marginal Product of Labor falls from 0.45 to 0.28. This result means that the productivity of the last...
1.       Which statement(s) is (are) correct? a.       The planning horizon for any business is between three...
1.       Which statement(s) is (are) correct? a.       The planning horizon for any business is between three and five years. b.      Forecasts that extend beyond the planning horizon are less credible. c.       The planning horizon should be the furthest point in the future considered by the business plan. d.      The planning horizon for a hotel owner is determined by the length of the management contract. 2.       What statement would a hotel owner prefer to see in the business plan for a...
QUESTION 1 Which of the following is the correct reversing entry?
  QUESTION 1 Which of the following is the correct reversing entry?     Depreciation Expense        1550   Accumulated Depreciation          1550     Interest Revenue            2350   Interest Receivable               2350     Salary Expense              1980   Salary Payable                    1980     Income Tax Expense          2500   Income Tax Payable                2500    QUESTION 2 Prior to preparing the organization's financial statements, the accountant prepares     a balance sheet     a post-closing trial balance     an adjusted trial balance     a closed...
1. Which of the following is correct about the income statement: * It is an equation...
1. Which of the following is correct about the income statement: * It is an equation used by financial analysts It is an equation used by politicians It is a report that shows the cash inflows and cash outflows of the company It is a report that shows the revenues and expenses of the company None of the above 2. Which of the following is correct about cash flows statement: * It includes only the cash outflows It shows the...
1. Which of the following is correct about the income statement: * It is an equation...
1. Which of the following is correct about the income statement: * It is an equation used by financial analysts It is an equation used by politicians It is a report that shows the cash inflows and cash outflows of the company It is a report that shows the revenues and expenses of the company None of the above 2. Which of the following is correct about cash flows statement: * It includes only the cash outflows It shows the...
1 - Which of the following is not a correct statement about competitive advantage? a. If...
1 - Which of the following is not a correct statement about competitive advantage? a. If France produces 50 bottles of wine per labor hour while Germany 5, France has absolute advantage over Germany in wine. b. If France produces 25 bottles of beer per labor hour while Germany 20, France has comparative advantage over Germany in beer. c. If France produces 50 bottles of wine per labor hour while Germany 5 and beer production is as in “b”, France...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT