L&T Technology Services Interview Question

what is pointer and how do it stores value?

Interview Answer

Anonymous

Aug 23, 2024

A pointer is a variable that stores the memory address of another variable. In programming languages like C and C++, pointers are used to directly access memory and manipulate data stored in those memory locations. int x = 10; // 'x' is an integer variable int *p = &x; // 'p' is a pointer to an integer, and it stores the address of 'x'