RE:
What are the advantages of using pointers in a program?
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 th array at runtime by allocating the necessary space.
Coming to the disadvantages of pointers 1.) If sufficient memory is not available during runtime for the storage of pointers, the program may crash (least possible) null
RE: What are the advantages of using pointers in a pr...
the main advantage of pointer , you can play with o/s. you can hold the whole memory management. u can chage the content of IVT. u can write directly in the buffer of screen at address oxb8000000. like this many other advantage are their.
form the prog. view yes one can use dynamic memory allocation,as function passing argument, can find the address of any variable etc.
RE: What are the advantages of using pointers in a program?
The advantages of using pointers are:
1: you can work with the address of the variable 2: you can reference the variables in more different easiest ways....    e.g int a[10],*b;                b=&a;         if you want to refer a[5] you can refer it as a[5] or *(a+5) or *(5+a)         this is a simple one....but in large programs it will make a difference. 3. if you want to access a variable quickly or efficiently with out wasting c.p.u time you have only 2 ways.. one is declare it as a register variable... and other one is declare it with a pointer.... because a c.p.u has less registers in it ( approximately 6 i.e A,B,C,D,E,F,G,H), when no register are freely available then you CAN DO THAT TASK WITH ONLY POINTERS.... 4.by using pointers you can improve the c.p.u's throughput time (throughput time refers to no of jobs done by the c.p.u in unit amount of time)....    these are the advantages that can be acquired from pointers.