what is the use of pointers
Answers were Sorted based on User's Feedback
Answer / ramudu a
The main advantages of using pointers are
1.) Function cannot return more than one value. But when the same function can modify many pointer variables and function as if it is returning more than one variable.
2.) In the case of arrays, we can decide the size of the array at runtime by allocating the necessary space.
3.)Pointers allow you to dynamically request memory to store off information for use later.
4.)They allow you to create linked lists and other algorithmically oriented data structures.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manju
It increases the speed of excecution when there is a need
for the usage of arrays....
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sindhu
We may return more than one value at a time to any function.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / venkat1435@yahoo.co.in
by using pointers
1)we can pass the function arguments to another function
2)it holds the address of another function
3)it acts as a call back function
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vignesh1988i
1) pointers which points to a value indirectly through that variable containing that value..... so pointers are used for data security.
2) only by using pointers through functions we can return MORE THAN ONE VALUE AT A TIME.....
3) as above told execution will be faster.....
Is This Answer Correct ? | 0 Yes | 0 No |
What will be the result of the following C language program? main() { int a = 0; int b = 20; char x = 1; char y = 10; if(a,b,x,y) printf("Welcome"); }
What are the salient features of c languages?
Is double link list a linear data structure? If Yes, Why?If No, Why?
what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
dynamically allocate memory for linear array of n integers,store some elements in it and find some of them
If null and 0 are equivalent as null pointer constants, which should I use?
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }
write an algorithm and a program to count the number of elements in a circularly singly linked list
Why doesn't the code "a[i] = i++;" work?
What is the difference between array and pointer?
What is local and global variable in c?