Question
In which programming language are pointers explicitly
supported and used for memory manipulation?Solution
Pointers are variables that store the memory address of another variable. They are explicitly supported in languages like C and C++. Pointers provide low-level access to memory, enabling operations like dynamic memory allocation, arrays, and data structure manipulation. Example in C++: int x = 10; int* ptr = &x; // Pointer to variable x std::cout << "Value of x: " << *ptr << std::endl; // Dereferencing pointer ________________________________________ Why Other Options Are Incorrect: 1. Java: Java uses references instead of pointers, abstracting away memory management for safety and simplicity. 2. Python: Python abstracts memory management and does not expose raw pointers to developers. 3. JavaScript: JavaScript is a high-level language that does not support pointers or manual memory manipulation. 4. Kotlin: Kotlin, like Java, does not expose pointers and relies on managed memory through JVM.
An article with cost price of Rs. 1800 is marked 44% above its cost price and sold after two successive discounts of 20% and Rs. ‘X’ respectively su...
A shopkeeper bought a mobile phone for Rs. 18,500 and sold it for Rs. 21,275. What percentage of profit did he earn in this transaction?
A shopkeeper marked an article Rs. 600 above its cost price and sold it after giving a discount of 20% and earned a profit of 30%. Find the cost price o...
- The cost price of a product is Rs. 400. The shopkeeper marks it 25% above the cost price and then offers a discount of 10%. Calculate the overall gain or l...
Gita purchased 4 mobiles, 16 watches, and 8 tablets for Rs. 320, Rs. 960, and Rs. 480, respectively, from a seller. By selling each mobile and each watc...
Select the options that correctly indicate a 25% profit and a 15% loss
An item costs ₹2,000 less than ₹5,000. The dealer offers a discount of 10% and the retailer further offers a discount of 5% on its CP. The final SP ...
An item marked at Rs. 1,500 is sold for Rs. 1,020 after two successive discounts of 15% and Y%. If a gadget with a cost price of Rs. 6,000 is sold at a ...
- Priya bought a painting for Rs. 32,000 and sold it for Rs. 36,800. What was her profit percentage?
A vendor priced an item 25% higher than its cost price. During the sale of the pen drives, if the seller enhances the discount from 15% to 20%, the prof...