Question

    In which programming language are pointers explicitly

    supported and used for memory manipulation?
    A Java Correct Answer Incorrect Answer
    B Python Correct Answer Incorrect Answer
    C C++ Correct Answer Incorrect Answer
    D JavaScript Correct Answer Incorrect Answer
    E Kotlin Correct Answer Incorrect Answer

    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.

    Practice Next