Tuesday, July 28, 2009

In the following statement ..............?

a) In the following statement





struct customer *ptr = malloc( sizeof( struct customer ) );





Given the sample allocation for the pointer "ptr" found above, write a statement to reallocate ptr to be an array of 10 elements?








b) Consider the following steps that shows the possible connection between a pointer dp and the dynamic variable associated with it.





1. Dp = 0045:02FE pointer Variable (Data segment)


2. *dp = 3.1415 dynamic variable (heap)








How I can Write c++ statements that generates code for these steps.

In the following statement ..............?
C++ Language Tutorial


http://www.cplusplus.com/doc/tutorial/


///
Reply:I didnt realize that this site was now used for HOMEWORK!! What a great idea?? Wish it was around when I was in school, maybe I would have gotten better grades, having someone answer my school projects!!!! You wont learn anything unless you actually do it yourself.


No comments:

Post a Comment