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 |
How to construct virtual constructor
6 Answers CIStems Software, Symphony,
What are friend functions in C++?
What does scope resolution operator do?
How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?
Do vectors start at 0 c++?
What is the size of integer variable?
How much is c++ certification?
How did c++ start?
pls help.. paper bills.. 1000, 500, 100, 50, 20, 10, 5, 1.. create a program that will count all the paper bills in the number being input.. example: enter a number: 3886 there is/are: 3 ->1000 1 ->500 3 ->100 1 ->50 1 ->20 1 ->10 1 ->5 1 ->1 example2: enter a number: 728 there is/are: 0 ->1000 1 ->500 2 ->100 0 ->50 1 ->20 0 ->10 1 ->5 3 ->1
What is the difference between interpreters and compilers?
Differentiate between a template class and class template in c++?
print first nodd numbers in descending order