If you had the following code: int x = 23; int *y; y = &x;
The instruction y++; does what?
Answer Posted / naresh kumar
here Y is integer pointer which is storing address of x.
suppose we assume address of X is 65524. this value will stored in pointer variable Y. int variable is capable of storing 2 bytes of memory. If increment or decrement variable Y, It points to next memory location, i.e 65526.
that means y=65524
y++
65526
y++
65528
this will keep on increasing by 2 bytes.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is a constructor in c++ with example?
What does flush do?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
Differentiate between the manipulator and setf( ) function?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
what are function pointers?
What are built-in functions? What is the syntax for the definition?
What is the object serialization?
Define the process of handling in case of destructor failure?
If a function doesn’t return a value, how do you declare the function?
Can I learn c++ without learning c?
When one must use recursion function? Mention what happens when recursion functions are declared inline?
What do you mean by ‘void’ return type?
Can a program run without main in c++?