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 |
write a program that takes two numbers from user that prints the smallest number
What character terminates all character array strings a) b) . c) END
write a program that will produce the ff. output. "what fruit will you buy? 1)apple 2)orange 3)mango ENTER CHOICE (1,2 or 3)> HOW MANY WILL YOU BUY?> THAT WILL COST XX.XX
What are the extraction and insertion operators in c++? Explain with examples.
How the V-Table mechanism works?
Do you know what are static and dynamic type checking?
Can we declare a base-class destructor as virtual?
What is a class definition?
What are the four main data types?
What is the difference between public, private, and protected access?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
What is atoi?