Strcpy( itemPtr->desc, "Granny Smith Apples" ) ħ. Then write code to change the value of num to 5 and print it's value without using the variable name (use the pointer). For example, given integer variable num, write code to declare a pointer variable called numPtr and store the address of num in numPtr. This is not particularly useful, it just demonstrates that you know how pointers work. I expect you to be able to manipulate the value of a variable of a simple type using a pointer. Note: All chapter numbers refer to the Gaddis textbook.ġ. Please let me know if you find any errors in the answers. ITSE 1307 - Introduction to C++ Programming
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |