1. #1
    magesh
    Join Date
    May 2011
    Posts
    1

    What is Pointer in C Language?

    Hello sir I have doubt from few days I just want to know what is the meaning of pointer in C language? thanks in advance





  2. Related:
  3. #2
    igmathew
    Join Date
    May 2011
    Posts
    1

    Re: What is Pointer in C Language?

    pointers are actually variables that can only hold the address of a memory location. Each location in the memory ha some address. The address of a veriable can be obtained by using & operator. For eg int *p =&a where p is the pointer variable which holds the address of variable a. Similarly value in a memory location can be obtained from the pointer using * operator. So in the above eg printing a is equallent to printing *p.




  4. #3
    manashvic
    Join Date
    May 2011
    Posts
    26

    Re: What is Pointer in C Language?

    a pointer is progamming language data type whose value refers to some other value stored in ur pc
    do consult with some c++ teacher

  5. #4
    anshika
    Join Date
    May 2011
    Location
    Bangalore
    Posts
    275

    Re: What is Pointer in C Language?

    Hi Sir,
    As you might be very much familiar with C language ,and the word comes POINTER comes from C programming only .Pointer is mainly defined as a data type which can create the special types of variables and can hold the address of primitive data type like char, int, float ,double and many other characters or user defined data type like function ,pointer etc,or can derived the data type array structure ,union ,enum. Thanks

  6. #5
    Renu16
    Join Date
    May 2011
    Posts
    3

    Re: What is Pointer in C Language?

    A pointer in C is the address of something.
    A pointer is a variable which contains the address in memory of another variable.

    For eg:

    int *ptr;
    float *string;

    we can declare it as
    ptr=#

    if we declare pointer then we must point it to something as done in above eg...
    and & contain the address.........

  7. #6
    venkataprakash
    Join Date
    Apr 2011
    Location
    chennai.
    Posts
    1,275

    Re: What is Pointer in C Language?

    Quote Originally Posted by magesh View Post
    Hello sir I have doubt from few days I just want to know what is the meaning of pointer in C language? thanks in advance
    Pointer is a derived datatype In C language.It is a built from one of the fundamentals datatype available In C Language.Pointer contain memory address as their values.Since these memory address are the locations in the compute memory where program Instructions and data are stored,Pointers can be used to access and manipulate data stored in the memory.The asterisk tells the compiler that you are creating a pointer variable.Syntax of Pointer

    datatype * variable name.

  8. #7
    prkataria
    Join Date
    May 2011
    Posts
    372

    Re: What is Pointer in C Language?

    ITS A DATA TYPE WHICH CAN CREATE SPECIAL TYPES OF VARIABLES AND CAN HOLD THE ADDRESS OF PRIMITIVE DATA.

  9. #8
    rajeshperumal
    Join Date
    Jun 2011
    Location
    erode
    Posts
    385

    Re: What is Pointer in C Language?

    hello

    A pointer stores the address of a variable

    POINTER DECELERATION

    [datatype] *[variable]

    pointer simply points the variable....in real time example it is similar to URL forwarding

    A special type of pointer usage is pointer of pointer ...that is a pointer points a pointer which again points a variable..

    thanks

  10. #9
    amit nandagawali
    Join Date
    Jun 2011
    Location
    bhandara
    Posts
    228

    Re: What is Pointer in C Language?

    Pointer in c language is a variable which is used to store addresses of another variable.
    we can declare pointer as
    ex.
    int *a
    int is data type and a is a variable.

  11. #10
    vipul sharma
    Join Date
    May 2011
    Location
    india
    Posts
    907

    Re: What is Pointer in C Language?

    A pointer is a very fundamental part of C language.
    It is the one of the most imporatnt parts of C.
    Explaining pointer in detail is beyond the scope of a definition that i have written for your refrence.
    You must consult some good book such as Let us C by Kanitkar.
    A pointer is a variable which contains the address in memory of another variable.
    They are used to refer to memory location of another variable without using variable identifier itself.
    To declare a pointer to a variable you have to write:- int *pointer.

  12. #11
    BISWARUP
    Join Date
    May 2011
    Location
    PURULIA
    Posts
    3,998

    Re: What is Pointer in C Language?

    a pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address. For high-level programming languages, pointers effectively take the place of general purpose registers in low-level languages such as assembly language or machine code, but may be in available memory.

  13. #12
    manikandan007
    Join Date
    Jun 2011
    Location
    india
    Posts
    315

    Re: What is Pointer in C Language?

    What is the pointer in c language?

  14. #13
    vivekbunty
    Join Date
    Jun 2011
    Location
    PATNA
    Posts
    204

    Re: What is Pointer in C Language?

    Pointer is a user defined data type which creates special types of variables which can hold the address of primitive data type like char, int, float, double or user defined data type like function, pointer etc. or derived data type like array, structure, union, enum.
    Examples:
    int *ptr;
    int (*ptr)();
    int (*ptr)[2];

  15. #14
    manojmanu
    Join Date
    Jun 2011
    Posts
    49

    Re: What is Pointer in C Language?

    pointer is a user defined a data type which creates special type of variables or hold the address of the data type

  16. #15
    Abitha
    Join Date
    Jun 2011
    Posts
    161

    Re: What is Pointer in C Language?

    hiiiiiii,
    Pointer is mainly defined as a data type which can create the special types of variables and can hold the address of primitive data type like char, int, float ,double and many other characters or user defined data type like function ,pointer etc,or can derived the data type array structure ,union ,enum

  17. #16
    Unregistered

    Re: What is Pointer in C Language?

    sir,give me some examples?

  18. #17
    Adeeba kausar
    Join Date
    Jun 2011
    Posts
    243

    Re: What is Pointer in C Language?

    hii pointer is a variable which is used to show the address of other variable>it is represented by "*" symbol.Its is the important concept when it comes to the C .you can learn very well about pointers in let us C from yashwant kanitkar.you can also learn from good institutes like the NIIT.

  19. #18
    Shubham Agarwal
    Join Date
    Jun 2011
    Posts
    278

    Re: What is Pointer in C Language?

    A pointer is basically a variable which is used to point at the address of another variable using an address operator which is &(ampersand).
    A pointer variable is declared by giving it a type and a name (e.g. int *ptr) where the asterisk tells the compiler that the variable named ptr is a pointer variable and the type tells the compiler what type the pointer is to point to (integer in this case).Once a variable is declared, we can get its address by preceding its name with the unary '&' operator, as in &k.

  20. #19
    Babujanu
    Join Date
    Jul 2011
    Posts
    146

    Re: What is Pointer in C Language?

    As you might be very much familiar with C language ,and the word comes POINTER comes from C programming only .Pointer is mainly defined as a data type which can create the special types of variables and can hold the address of primitive data type like char, int, float ,double and many other characters or user defined data type like function ,pointer etc,or can derived the data type array structure ,union ,enum. Thanks

  21. #20
    suryaprasath
    Join Date
    Jul 2011
    Posts
    1

    Re: What is Pointer in C Language?

    ActiveX is a framework for defining reusable software components in a programming language independent way. Software applications can then be composed from one or more of these components in order to provide their functionality.
    cegonsoft

  22. #21
    Unregistered

    Re: What is Pointer in C Language?

    Defination of pointer with clear example.

  23. #22
    Unregistered

    Re: What is Pointer in C Language?

    how many types of pointer in C language?

  24. #23
    Unregistered

    Re: What is Pointer in C Language?

    Even also i am not understand the concept of pointer please give me a brief explanation

  25. #24
    Unregistered

    Re: What is Pointer in C Language?

    what is basic concept of pointr in c ?

  26. #25
    Unregistered

    Re: What is Pointer in C Language?

    what is basic concept of pointer in c ?

  27. #26
    Unregistered

    Re: What is Pointer in C Language?

    plz increase lenth of answer

  28. #27
    Unregistered

    Re: What is Pointer in C Language?

    what is different between array and pointer?

  29. #28
    anjali.anjall
    Join Date
    Jul 2012
    Location
    Allahabad
    Posts
    1,658

    Re: What is Pointer in C Language?

    A pointer is a variable that points to another variable that means it holds the memory address of another variable. It points to thah other variables by holding its address.
    The operator that is avaiable in c language to determine the address of a variable is '&'(address of).
    And the operator '*' called as value at address.it returns a value stored at that address
    ptr = & qty
    qty returns the address of qty and this address can be stored in variable ptr
    example
    int * ptr;

  30. #29
    karan111
    Join Date
    Aug 2012
    Posts
    589

    Cool Re: What is Pointer in C Language?

    [COLOR="rgb(139, 0, 0)"]ponter is a user defined datatype which creates special types of variables
    which can hold the address of premitive datatype like char, int , float ,double or user defined
    datatype like function or derived datatypes like structure,union,enum.
    for example:-
    int *ptr;
    int ( *ptr) ();
    int (*ptr)(5);

    .................
    [/COLOR]


    karan111

  31. #30
    mylove
    Join Date
    Jun 2012
    Location
    jaipur
    Posts
    630

    Re: What is Pointer in C Language?

    Quote Originally Posted by magesh View Post
    Hello sir I have doubt from few days I just want to know what is the meaning of pointer in C language? thanks in advance
    hello
    pointer:
    pointer is a variable that contain the address of a variable. for exam
    int *p;(this is a pointer type variable)
    int a=10;(local variable)
    p=&a;(assign variable address to to pointer variable)
    explain:
    suppose address of a is 100 but value is 10. i do p=&a. it means i am assign the address of a into pointer variable p.
    if i will print only p then it will print address of a means 100.
    if i will print *p then it will print value of a means 10.

    this is pointer in C language.
    for more detail you can follow:
    ANSI C by Balagurusamy
    C by Lakhan pal Publication.

    good luck

  32. #31
    Just Guesss?
    Join Date
    Jul 2011
    Location
    A.S.Rao Nagar - Hyderabad
    Posts
    1,687

    Re: What is Pointer in C Language?

    Hello Friend !!

    Pointer :

    A Pointer is nothing but a user defined data type which creates special types of variables.

    These Variables are responsible to hold the address of :

    Primitive Data Type ( like char, int, float, double ) or

    User Defined Data Type ( like function, pointer etc. ) or

    Derived Data Type ( like array, structure, union, enum )

    We use Pointers in order to point to the Address of a variable which is in another class.

    Once a value for a variable in defined, we can use it many times by just using its address.

    Simply we will use the address and we can call the value of a variable wherever we need in the same class or different class.

    And one more thing is the Arithmetic operations can be performed with Pointers.

    Arithmetic operations are nothing but, Add, Sub, Mul, Div, Increment, Decrement, Null, etc,.

    Example of Defining a Pointer : You can also call them as Syntax of a Pointer.

    int *ptr;

    int (*ptr)();

    int (*ptr)[2];

    Sample Program for defining a Pointer :





    Different Types of Pointers used in C Language are :

    Complex pointer

    Generic pointer

    Null pointer

    Wild pointer

    Dangling pointer

    Near pointer

    Far pointer

    Suggestion :

    If you want more details about pointers and all other terms related to C-Language, go to www.w3schools.com

    This site will helps you alot in learning the Languages.

    I hope you got the relevant info regarding Pointer.

    Thank you !!

  33. #32
    nagma yadav
    Join Date
    Sep 2011
    Location
    Hyderabad,AP
    Posts
    643

    Re: What is Pointer in C Language?

    Hi.,

    Pointer is a user defined data type which creates special types of variables which can hold the address of primitive data type like char, int, float, double or user defined data type like function, pointer etc. or derived data type like array, structure, union, enum.

    Examples:

    >int *ptr;
    >int (*ptr)();
    >int (*ptr)[2];

    In c programming every variable keeps two type of value.
    1. Contain of variable or value of variable.
    2. Address of variable where it has stored in the memory.

    >Meaning of following simple pointer declaration and definition:
    int a=5;
    int * ptr;
    ptr=&a;

    About variable a:
    1. Name of variable : a
    2. Value of variable which it keeps: 5
    3. Address where it has stored in memory : 1025 (assume)


    About variable ptr:
    4. Name of variable : ptr
    5. Value of variable which it keeps: 1025
    6. Address where it has stored in memory : 5000 (assume)

    Hope you got the content...

    Good Luck!!

  34. #33
    tanveersandhu
    Join Date
    Jun 2012
    Posts
    627

    Re: What is Pointer in C Language?

    My dear friend Pointer in C Language is a Variable which Stores the Address of another variable.

    The variable whose address is stored in the Pointer can be retrieved or accessed from locating its address from the Pointer variable in which it is stored.

    The concept of Using Pointers is very much famous in C++.

    Pointer can also be declared as Null as shown in the figure Below:



    A pointer variable must point to some data items otherwise it is useless and the program may show errors.

    I hope the Information will be satisfactory.


    Regards
    tanveersandhu.

  35. #34
    jericho
    Join Date
    Apr 2012
    Location
    Bikaner, Rajasthan
    Posts
    1,247

    Re: What is Pointer in C Language?

    Friend,


    Pointer is a variable just like other variables of C but only difference is unlike the other variable it stores the memory address of any other variables of C.
    Pointer is a user defined data type which creates special types of variables which can hold the address of primitive data type like char, int, float, double or user defined data type like function, pointer etc.
    Pointers are used to refer to memory location of another variable without using variable identifier itself. Basically Pointer is Variable Which Contain Address of Another Variables.
    Pointer is a variable that represents the location of a data item, such as variable or an array element. Pointer variables, like all other variables, must be declared before, they may be used in C program.
    When a pointer variable is declared, the variable name must be preceded by an asterisk(*)





    Thank you!

  36. #35
    laptop
    Join Date
    Sep 2012
    Posts
    133

    Re: What is Pointer in C Language?

    Pointer concept in C it actually contain only the address of the another veriable.

    For eg:

    int *ptr;
    float *string;

    we can declare it as
    ptr=#

    thanks.

  37. #36
    mnbgvs
    Join Date
    Sep 2012
    Posts
    50

    Re: What is Pointer in C Language?

    Re: What is Pointer in C Language?



    hello

    A pointer stores the address of a variable

    POINTER DECELERATION

    [datatype] *[variable]

    pointer simply points the variable....in real time example it is similar to URL forwarding

    A special type of pointer usage is pointer of pointer ...that is a pointer points a pointer which again points a variable..

    thanks

  38. #37
    irshad.a
    Join Date
    Sep 2012
    Posts
    1,286

    Re: What is Pointer in C Language?

    Pointer in c language is a variable which is used to store addresses of another variable.

    Different Types of Pointers used in C Language are :

    Complex pointer

    Generic pointer

    Null pointer

    Wild pointer

    Dangling pointer

    Near pointer

    Far pointer


    THANK YOU----------

  39. #38
    tash1907
    Join Date
    Jul 2012
    Posts
    854

    Re: What is Pointer in C Language?

    Hi Friend......



    Explain Pointer in C

    Pointer is a user defined data type which creates special types of variables which can hold the address of primitive data type like char, int, float, double or user defined data type like function, pointer etc. or derived data type like array, structure, union, enum.

    Examples:

    int *ptr;
    int (*ptr)();
    int (*ptr)[2];

  40. #39
    shair
    Join Date
    Sep 2012
    Location
    jaipur
    Posts
    145

    Re: What is Pointer in C Language?

    hello friends:-

    [COLOR="rgb(139, 0, 0)"]POINTER DEFINATION[/COLOR]

    >Pointer is a variable that holds the another variable.

    >pointer holds the address of the value in memory location.

    >pointer does not hold the value it only holds the address.

    >it holds address not value thats why it has two parts.

    >the pointer itself holds the adress,and adress holds the value.


    [COLOR="rgb(139, 0, 0)"]>>features of pointer[/COLOR]

    >it is a powerful feature of c language.

    >it is a new kind of datatype.

    >it stores adress not value.

    >it allows indirect access to data.

    >it helps in returning more than one value from funtion.

    >it helps in dynamic memory location.

    >it allows to carry whole array to function.

    [COLOR="rgb(139, 0, 0)"]>>EXAMPLE..[/COLOR]

    #include<stdio.h>

    void main()
    {
    int i,j;
    int *p; / * a pointer to an integer
    p=&i;
    *p=5;
    j=i;

    printf("%d %d %d\n",i,j,*p);
    }

    best of luck

  41. #40
    khurana
    Join Date
    Sep 2012
    Posts
    53

    Re: What is Pointer in C Language?

    Pointers are variables which hold the address of another variable.It is denoted by *p.
    suppose we have variable v=15 stored on location 2005 then *p=2005(&v - address of variable v).it is user defined datatype

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Quick Reply Any Question?