Pointers are variables that only point to memory locations instead of variables that contain the information itself. Other languages use pointers to point to complex data types such as a data structure, but C allows much more robust pointers. A pointer will use a lot less memory to point to a memory location that having to use the memory itself every time.
Why pointers are important in c language?
to manipulate memory.
Reply:Instead of passing the actual data of complex data structures to a function, pointers allow you to just pass a pointer to the structure instead.
A pointer is a variable that hold the memory location of another vaariable.
example:
say "count" = 10.
the variable "count" is in memory location 0x0150a48c, which contains the number 10.
A pointer to count, "pcount", would hold the number "0x0151a48c".
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment