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 |
Write code for atoi(x) where x is hexadecimal string.
pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used.
what is the full form of c language
can we execute the program with the object file
#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }
12 Answers Capital IQ, Sasken,
Why main is used in c?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Why ca not I do something like this?
What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); }
11 Answers CISOC, CitiGroup, College School Exams Tests,
Can a program have multiple main() functions?
How can I find out the size of a file, prior to reading it in?