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 are the effects after calling the delete this operator ?
What does the nocreate and noreplace flag ensure when they are used for opening a file?
Differentiate between the message and method in c++?
Define basic type of variable used for a different condition in C++?
What is the use of c++ programming language in real life?
Differentiate between a pointer and a reference with respect to c++.
What is the use of setfill in c++?
Are vectors faster than arrays?
Write syntax to define friend functions in C++.
What is an adaptor class in c++?
What is c++ manipulator?
Why is it called c++?
Explain the operation of overloading of an assignment operator.
How much do coding jobs pay?
Describe linkages and types of linkages?