1 Answer - Sort by: Date | Rating
Pointers are used in languages like C++, and Java and can be confusing for many programmers. However, the concept behind a pointer is relatively simple. It stores the memory address where a particular variable is stored. We can then directly access the variable, through the memory address, to read its contents or perform other manipulations. Thus, a variable that stores an address value is called a pointer.
When you define a pointer it must have data type. This is not the data type of the pointer but the data type of the kind of variable that the pointer points to. For example, if you want a pointer that stores the address of an integer then that pointer will be of int data type (pointer to an int). Similarly, you cannot store the address of a float type variable in an int pointer. A pointer must be of the same data type as the variable who's address it stores.
The only exception to the above stated rule is the VOID POINTER. A void pointer is a general-purpose pointer that can store the address of any data type.
Void pointers can be used to pass pointers to functions that manipulate data irrespective of the data type.
When you define a pointer it must have data type. This is not the data type of the pointer but the data type of the kind of variable that the pointer points to. For example, if you want a pointer that stores the address of an integer then that pointer will be of int data type (pointer to an int). Similarly, you cannot store the address of a float type variable in an int pointer. A pointer must be of the same data type as the variable who's address it stores.
The only exception to the above stated rule is the VOID POINTER. A void pointer is a general-purpose pointer that can store the address of any data type.
Void pointers can be used to pass pointers to functions that manipulate data irrespective of the data type.
0
0
- Where Can I Get A Netbook (1000he Preferably) For A Reasonable Price?
- How To Down Load Phone Drivers?
- What Is The Main Chip In Ur Computer?
- What Is The Name Of The First Classification System?
- How Do You Connect Iphone To Parrot Ck3100 Car Kit?
- What Technique Is Used In Byte Oriented Protocols?
- How Do I Name My Computer?
- Which Topology Represents A Collision-free Environment?
- How Big Is Social Networking?
- Im Trying To Sell My Computer And The Hard Drive Went Bad So I Took It Out And I Want To Sell It With Out The Hard Drive How Much Could I Sell It For With Out A Hard-drive?
- What Impact Did Cameras Have?
- What Type Of Thing Does She Like?
- Where Is Title Bar Located?
- How Can We Classify The Network By The Size?
- What Are Some Factors That Should Be Considered When Implementing A Layer 2 Protocol In A Network?
- How To Copy Programs To A Flash Drive?
- I Can't Not Open Files. I Have Shut Down My Computer Without Closing Some Dialog Boxes. How Do I Close These Boxes?
- How To Recover Factory Settings Samsung F309?
- Describe The Following Components Of A Technological System?
- What Types Of Computers Are There?
- What Are The Different Processors Used In Today's Computers?
- How Do You Take Safe Mood Off Your Laptop?
- What Are Sub-systems ?explain
- Hi, My Name Is Moshe, My Iphone Goes Blank After I Put In A Pin Code, Anybody With An Idea Of Why?
- What Are The Advantages Of Client Server Networks Over Peer To Peer Networks?
- What Are Far And Near Pointers?
- What Is The Use Of Pointers In 'C' And Why Are There No Pointers In C++?
- Where Can We Use Pointers In C++?
- What Is Typecasting Of Pointers?
- Why Should We Use Pointers In C Language?
- What Is The Definition Of Pointers In C?
- Why Are Pointers Familiar In C?
- Are Pointers Integers In C?
- Why Pointers Are Not Used In Java?
- What Is Strength Of Pointers?
- Why We Are Using Pointers In C Programming?
- What Are English Pointers?

New Comment - Comments are editable for 5 min.