Start learning 50% faster. Sign in now
The code demonstrates pointer manipulation in C. Here’s a breakdown: • int x = 10, y = 20; declares two integers, x and y. • *p1 = &x, *p2 = &y; initializes p1 to point to x and p2 to point to y. • *p2 = *p1 + *p2; fetches the values of x and y through p1 and p2 respectively, adds them, and assigns the result back to y via *p2. After this operation, y becomes 30, while x remains 10. Output: 10 30. Why Other Options Are Incorrect: 1. 10 20: This would occur if no pointer manipulation happened, but the code modifies y. 2. 30 10: Only y is updated, not x. 3. Compiler error: The code is syntactically correct and compiles successfully. 4. Undefined behavior: The pointers are used properly with valid memory addresses, avoiding undefined behavior.
Which of the following equations represents the number of day in which B and C working together can finish the same work?
P, Q and R can do piece of work in 48, 60 and 80 days respectively. All three began to work together but P and Q left 12 and 16 days respectively before...
What is the amount that Sumit spends annually on paying his loan instalments?
A driver of truck sees an ambulance 160 meters ahead of him. After 20 seconds the ambulance is 140 meters behind. If the speed of the truck is 80 kmp/h,...
Aman is how much % (less/more) efficient than Kiran?
The speeds of Avinash and Rahul are 70km/hr and 90km/hr. Initially Rahul is at a place P and Avinash is at a place Q. The distance between Rahul and Avi...
A tank is filled by 3 pipes, second pipe take 10 hours more than first pipe and 10 hours less than third pipe to fill the tank alone. If second and thir...
Which of the following equations represents the number of days in which A alone can finish the same work?
Suppose Bittu is 50% more efficient than Aman then, what will be the time taken by Bittu alone to complete 40% of the work.
A is twice efficient as B and B can do a piece of work in 40 days. B started the work and after a few days A joined him. They completed the work in 32 d...