why we use pointer in c

Answer Posted / manjulatha

use of pointers makes the code more efficient and compact.
1.to acess array elements
2. to return more than one value to a function.
3. to acess dynamically allocated memory.
4. to implement data structures like linked lists,trees.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sizeof int return?

853


What is malloc return c?

806


what is the difference between class and unio?

2122


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

924


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1106


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1005


What are the 5 organizational structures?

819


Does * p ++ increment p or what it points to?

859


What are the types of assignment statements?

849


How do you override a defined macro?

940


What does void main return?

849


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5239


What is %lu in c?

936


What is the code in while loop that returns the output of given code?

1665


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1704