What is pointer with example?



What is pointer with example?..

Answer / Rammilan Yadav

A pointer in C++ is a variable that stores the memory address of another variable. It allows direct access and manipulation of memory locations. An example is: int num = 5; int* pNum = # Here, pNum is a pointer to an integer, and its value is the memory address of num.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Can c++ do everything c can?

1 Answers  


What is c++ stringstream?

1 Answers  


What is the real purpose of class – to export data?

1 Answers  


What are raw sockets, where they are efficient?

2 Answers   Symphony,


Describe about storage allocation and scope of global, extern, static, local and register variables?

1 Answers  


Disadvantages of c++

8 Answers   HCL,


Explain virtual functions in C++.

3 Answers  


Explain the need for "Virtual Destructor"?

2 Answers   Infosys,


What happens when a function throws an exception that was not specified by an exception specification for this function?

1 Answers  


How to tokenize a string in c++?

1 Answers  


Can we remove an element in a single linked list without traversing? Lets suppose the link list is like this 1 2 3 4 5 6 We need to remove 4 from this list (without traversing from beginning) and the final link list shud be 1 2 3 5 6 only thing we know is the pointer to element "4". How can we remove "4" and link "3" to "5"?

6 Answers   CSC,


What are c++ data types?

1 Answers  


Categories