Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

computer science

sharon
sharon 


C++ allows pointers to stack-dynamic variables. Consider the following C++ function: int twice(int x) { int *y; *y = x * 2; return *y; } Will the above function compile in C++? Is it correct? If not, under what circumstances will it fail and how should it be corrected? Consider one other language that has pointers. Does that language have the same problem? Explain. Attachments
Tags
Clarifications

Answers

Reasons along with program

sudheer488
sudheer488 



Detailed Reasons along with programs attached below Attachments Screenshots
Purchase Answer

Solution to the Question

felo
felo 



Find attached Attachments Screenshots
Purchase Answer