UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is the importance of pointers? People stress more on them. Why they are useful actually what is their importance?

Asked by Last Modified  

Follow 5
Answer

Please enter your answer

Project Development: Custom Training and Software based Project Development Company

Importance of pointers:- Pointers are used in situations when passing actual values is difficult or not desired. To return more than one value from a function. They increase the execution speed. The pointer are more efficient in handling the data types . Pointers reduce the length and complexity...
read more
Importance of pointers:- Pointers are used in situations when passing actual values is difficult or not desired. To return more than one value from a function. They increase the execution speed. The pointer are more efficient in handling the data types . Pointers reduce the length and complexity of a program. The use of a pointer array to character string results in saving of data. To allocate memory and access it( Dynamic memory Allocation). Implementing linked lists, trees graphs and many other data Structures. Pointers allow you to implement sharing without copying i.e. pass by reference v/s pass by copying. This allows a tremendous advantage when you are passing around big arrays as arguments to functions. Pointers allow modifications by a function that is not the creator of the memory i.e. function A can allocate the memory and function C can modify it, without using globals, which is a no-no for safe programming. allow us to use dynamic memory allocation. Pointers obviously give us the ability to implement complex data structures like linked lists, trees, etc Pointers allow ease of programming, especially when dealing with strings. This is due to the fact that a pointer increment will move by the size of the pointee i.e. easy coding to increment to the next memory location of an array, without worrying about how many bytes to move for each data type. I.e. a pointer to a char will move the pointer by a byte, pointer to an int, by the size of the int, etc NOTE that this is important because you do not have to worry about the size of the data types which can vary on different architectures.  Pointers allow us to resize the data structure whenever needed. For example, if you have an array of size 10, it cannot be resized. But, an array created out of malloc and assigned to a pointer can be resized easily by creating a new memory area through malloc and copying the old contents over. This ability is very important in implementing sparse data structures also.  read less
Comments

Computer Science Tutor

Some C programming tasks are performed more easily with pointers, such as dynamic memory allocation cannot be performed without using pointers. So it becomes necessary to learn pointers to become a perfect C programmer.
Comments

Computer Engineering / Diploma Tutor

Pointer get Important mainly because they can access data directly through their Address. Ex. if you know the address of your Monitor's memory area you can change it's display. and you can use any hardware of your computer through the pointer which can be programmed. So it is important.
Comments

Academic Tutor

Pointer is an address (reference) of a memory location. so if you have a pointer say 'p' = "some variable" , what exactly it means is the physical address of the memory location. So if you dereference the pointer by using *p then you can see the exact data at that memory location (I mean if you look...
read more
Pointer is an address (reference) of a memory location. so if you have a pointer say 'p' = "some variable" , what exactly it means is the physical address of the memory location. So if you dereference the pointer by using *p then you can see the exact data at that memory location (I mean if you look what exactly is there in that physical location) . So this way pointers are used in the C programming to dynamically use a memory location read less
Comments

2nd Year Engineering Student

Pointer is a variable that stores the address of another variable stored. Pointers are very useful in implementing Data Structure. Also, pointers are used to change the actual value of variable (call by address) which you will study in functions.
Comments

Software Professional / Teaching Enthusiast

Historical reasons: - C Programming language was developed at a time when developers were used to accessing Operating System and Hardware resources directly. Pointer feature largely catered to this audience. Practical reasons: - Pointer feature in C programming language, even to this day, is preferred...
read more
Historical reasons: - C Programming language was developed at a time when developers were used to accessing Operating System and Hardware resources directly. Pointer feature largely catered to this audience. Practical reasons: - Pointer feature in C programming language, even to this day, is preferred by developers for more fine grained control of Hardware and Operating System resources. Therefore C (or its variants) is most commonly used 1. To program Microcontrollers & Microprocessors through the use of C-To-Assembly interpreters/compilers 2. For System Programming i.e. writing low level device drivers, both in User mode and Kernel mode of Operating Systems 3. For writing Hardware Abstraction Layer Efficiency reasons: - 1. Pointers are still one of the efficient and optimized means to manage memory in programs. 2. C Programs execute faster, one of the reasons why they are preferred for low level programming. Pointers play a very critical role in ensuring this high performance read less
Comments

Computer Programming Expert and Software Developer

Using pointer we can have direct access to a memory location because they store address of a variable or memory location. Complex hardware programming can easily be done using pointers.
Comments

Pointers are useful in a lot many ways. Few people who have answered this question have their own reasons for the importance of pointers. It all depends on the context you are talking about. The question you've asked is a broad one. Narrow it down in a specific context, or else you need to scroll down...
read more
Pointers are useful in a lot many ways. Few people who have answered this question have their own reasons for the importance of pointers. It all depends on the context you are talking about. The question you've asked is a broad one. Narrow it down in a specific context, or else you need to scroll down all the way down to the last answer to search for the one you are looking for. read less
Comments

Computer Languages Tutor

In simple and sort by using pointer you will play with the original value or doing dynamic modification
Comments

.Net Trainer with 10 Years

Pointers are necessary for dynamic memory location, many data structures, and efficient handling of large amounts of data.
Comments

View 46 more Answers

Related Questions

What is an rvalue?
Rvalue was added with the C++11 standard. An lvalue is an expression that refers to a memory location and allows us to take the address of that memory location via the & operator. An rvalue is an expression...
Mohd
How and where do I start learning C programming?
Goals Fundamental concepts of C programming language. Write your first C program. Understand different keywords & Data types in C. Understand Variables & Scope of Variables. Learn Enumeration or Enum...
Krishna
0 0
5
hi sir c progarm codeing how to write sir........
take any C book then u can learn more...
Suryateja
Can include files be nested?
Yes. Include files can be nested any number of times. As long as you use precautionary measures, you can avoid including the same file twice. In the past, nesting header files was seen as bad programming...
Himangi
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Programing Languages Learning Tricks
You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that...
H

Harshal G.

0 0
0

Set 0 To Kth Bit In A Variable
The following code snippet Set 0 to Kth Bit in an variable #include int UnsetBitValue(int n, int k);int main(){ printf("%d\n\n",UnsetBitValue(255,6)); return 0;}// Set kth bit to zeroint UnsetBitValue(int...

Pro learners tip for C language
First get the concept of algorithm before heading to write your first program.

Creating First Program Using C Language
Step 1: Install and setup Turbo C compiler on your computer. Step 2: Open Turbo C from your Desktop or Programs menu. Select “File” from menu bar and select option “New”. Step...

Lets know about far, near and huge pointers for fresher interview purpose
All of these three candidates relate to 16 bit architecture where segmented memory architecture was there. They are not at all relevant for present days 32 or 64 bit architecture where the way of memory...

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more