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 c++ similar to?
write a function signature with various number of parameters.
What is prototype for that c string function?
What is iostream in c++ used for?
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?
What does it mean to declare a member function as static?
Is c++ a difficult language?
What is a dynamic binding in c++?
What is a literal in c++?
Write a program to add three numbers in C++ utilizing classes.
Explain the virtual inheritance in c++.
What is boyce codd normal form in c++?
Do class declarations end with a semicolon?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
What is c++ w3school?