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
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
How do you save a c++ program?
Is c++ high level programming language?
What do you mean by early binding?
How new/delete differs from malloc()/free?
Is c++ used anymore?
How is modularity introduced in C++?
What gives the current position of the put pointer?
Do you know the problem with overriding functions?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
What are friend classes?
What would happen on forgetting [], while deallocating an array through new?
What is dev c++ used for?
Explain the uses oof nested class?
What is an operator in c++?