C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 7)
7.
A pointer is
Discussion:
33 comments Page 3 of 4.
Shashank said:
1 decade ago
Pointer is a generic term which means "pointing to something".We can use pointer to store address of any variable or any function (Function pointer).
"Program Counter also known as instruction pointer (IP) in Intel x86 holds the address of instruction."
"Program Counter also known as instruction pointer (IP) in Intel x86 holds the address of instruction."
Michae Trussler said:
1 decade ago
The answer can be summarized as follows...
[A] A keyword used to create variables -> Wrong. A pointer is NOT a keyword.
[B]. A variable that stores address of an instruction -> Wrong. Though a pointer may hold the address of an instruction (i.e. function pointer), it is no required to
[C]. A variable that stores address of other variable -> Correct. A pointer is a variable that stores the address of any other variable be it a value or another address.
[D]. All of the above -> Wrong as A and B are incorrect.
[A] A keyword used to create variables -> Wrong. A pointer is NOT a keyword.
[B]. A variable that stores address of an instruction -> Wrong. Though a pointer may hold the address of an instruction (i.e. function pointer), it is no required to
[C]. A variable that stores address of other variable -> Correct. A pointer is a variable that stores the address of any other variable be it a value or another address.
[D]. All of the above -> Wrong as A and B are incorrect.
Suryaiiit said:
1 decade ago
pointer is also variable it stores the addres of another variable and also stores addres of itself.
//
(i) int i,*p;
p=&i;
(ii) int *p;
p=&p;
//
both cases are possible i hope now u understand wt a pointer is
//
(i) int i,*p;
p=&i;
(ii) int *p;
p=&p;
//
both cases are possible i hope now u understand wt a pointer is
Minhaj said:
1 decade ago
Ya its a variable holding adress of other variable as a content of it.
Nuthan said:
1 decade ago
Cute answer Raju.
Raju Naidu said:
1 decade ago
Normal variable means it stores the values directly. But if you want to change those values without touching those variables we are using pointers.
Pointer is a one type of variable it holds the address of the variable.
int a=5; // suppose a variable address is 100
int *p;
p=&a;// here p(pointer variable)holdes the address of the a variable.
Pointer is a one type of variable it holds the address of the variable.
int a=5; // suppose a variable address is 100
int *p;
p=&a;// here p(pointer variable)holdes the address of the a variable.
Arunendra dwivedi said:
1 decade ago
Pointer is just and address holder of anather variable narmally.
But it is a very good concept of reusability. In c pointer use some signs also.
But it is a very good concept of reusability. In c pointer use some signs also.
Nadipineni said:
1 decade ago
Its basic definition of pointer.
Arvind yadav said:
1 decade ago
By using pointer one can access memory location directly
Faraz Uddin said:
1 decade ago
A pointer is used to store the address of another variable
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers