This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: When I actually tried this code in dev c++, the program executed successful but it would immediately close the window so as not to show the results. 10. What is the output of the code? Int *secret; Int j; Secret = new int; Secret = 10; For (j = 1; j < 10; j++) Secret[j] = secret[j-1] +5; For (j = 0; j < 10; j++) Cout << secret[j] << “ “; Cout << endl; Output: 10 15 20 25 30 35 40 45 50 11. Explain the difference between a shallow copy and a deep copy of data. Shallow copy is when 2 pointers point to the same data in a memory location whereas, the deep copy is the same data in a second location, making two copies....
View Full Document
This note was uploaded on 02/21/2012 for the course COMPUTER CS 230 taught by Professor Idk during the Spring '12 term at Capitol College.
- Spring '12
- Computer Science