If you had the following code: int x = 23; int *y; y = &x;
The instruction y++; does what?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / anu
Then y will point to next memory location.
If we are using (*y)++ will increment value to 24.
| Is This Answer Correct ? | 4 Yes | 5 No |
structure contains int, char, float how it behaves for big endian and little endian?
How is static data member similar to a global variable?
Explain about templates of C++.
What is the difference between an enumeration and a set of pre-processor # defines?
What is implicit conversion/coercion in c++?
sizeof - is it a function or operator?
Why c++ is better than c language?
Which is best ide for c++?
How much is size of struct having 1 char & 1 integer?
Is there a datatype string in c++?How is the memory allocation?
What is a breakpoint?
What do you mean by ‘void’ return type?