C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 7)
7.
A pointer is
Discussion:
33 comments Page 1 of 4.
Parth said:
7 years ago
Pointer is a special type of variable which stores address of another variable of same type.
Ramya said:
8 years ago
Can anyone tell me pointer is a variable or operator?
(1)
Mukesh Kr Siddhwan said:
9 years ago
Pointer is a specific type of variable that can be used to store the address of other variable. It is always denoted by '*' operator.
Some Features of pointer:
1. Pointer save the memory space.
2. Execution time with pointer is faster because data is manipulated with the address. i.e., direct access to memory location.
Pointer declaration:
Data type *pointer name;.
For example:
void main()
int a=100;
int *p;
p=&a;
In above example 'a' is the integer type of variable and 100 ia the value of that variable. *p is the pointer name. Suppose 4066 is the address of variable 'a'.
In above example p=&a;-in this code pointer p can be use to store the address of variable 'a', means the value of pointer p is 4066 (that is the address of variable 'a').
Some Features of pointer:
1. Pointer save the memory space.
2. Execution time with pointer is faster because data is manipulated with the address. i.e., direct access to memory location.
Pointer declaration:
Data type *pointer name;.
For example:
void main()
int a=100;
int *p;
p=&a;
In above example 'a' is the integer type of variable and 100 ia the value of that variable. *p is the pointer name. Suppose 4066 is the address of variable 'a'.
In above example p=&a;-in this code pointer p can be use to store the address of variable 'a', means the value of pointer p is 4066 (that is the address of variable 'a').
(1)
Rishikesh Agrawani said:
9 years ago
A pointer is a variable of specific type, whose value is address of another variable of its type. The variable can be of any built-in type or any user defined type.
We should have the good knowledge of pointers as it provides a good way of handling dynamic data structures like linked list, stack, queue etc. We use indirection operator (*) in front of variable name for declaring pointer variable.
Eg: int *iptr; char *cptr;
We should have the good knowledge of pointers as it provides a good way of handling dynamic data structures like linked list, stack, queue etc. We use indirection operator (*) in front of variable name for declaring pointer variable.
Eg: int *iptr; char *cptr;
Manmeet said:
9 years ago
The correct definition of a pointer is:
Pointer is a variable that stores logical address of an another variable.
We should always specify what type of address we are talking about.
As there are two types of addresses that are:
1: Physical addresses.
2: Logical addresses.
Pointer is a variable that stores logical address of an another variable.
We should always specify what type of address we are talking about.
As there are two types of addresses that are:
1: Physical addresses.
2: Logical addresses.
Juna sudev said:
10 years ago
Dudes one doubt is arise to me. Pointer is one of the data type know? Then how will we tell option C is right?
Rishikesh Agrawani said:
10 years ago
Hello friends, I just want to discuss few points about the pointer:
(1) A pointer is a variable of specific type, which is capable of holding the address of another variable of the same type.
(2) It is most powerful concept of c/c++, which allows us to manipulate the contents of memory by their addresses.
(3) You can sort the set of strings by using only single double pointer variable in your source program, try to do it, if you never tried. It will help you to have the good knowledge of pointer.
(1) A pointer is a variable of specific type, which is capable of holding the address of another variable of the same type.
(2) It is most powerful concept of c/c++, which allows us to manipulate the contents of memory by their addresses.
(3) You can sort the set of strings by using only single double pointer variable in your source program, try to do it, if you never tried. It will help you to have the good knowledge of pointer.
Vijaykumar gattu said:
10 years ago
It stores the address of the variable how?
Mary gold said:
10 years ago
Pointer is not a variable because variable is used to store the values but pointer is used to store the address of variable.
So pointer is a operator which is used to store the address of another variable.
So pointer is a operator which is used to store the address of another variable.
Bhawana said:
10 years ago
Can anybody tell why option B is not correct?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers