Sunday, July 12, 2009

" POINTERS"in C?

Hi! frnds,


can anyone plz. sugest some sites on which i can get to solve some example programs in "POINTERS" in C , and also how to draw the flowchart and algorithm of a pointer program.please help....!!


thank u!

" POINTERS"in C?
See there are no specific sites for this but try some good books ,online www.cplusplus.com .
Reply:My name deepak I am doing Bca and site by site i have teach C language to Bca and Btech student.I have to tell


U because i don't thing that U have go for web site for


Pointer problem.It better to built up Ur confidence because


according to me if anybody want to learn C language(pointer).


First step is that U have more than Two Books at a


time.


Second step never read the theory directly move to program Because u r waisting Ur time in reading theory.


Third daily do only two to three question because if U completed whole exercise in one day u are totally confuse.


Forth Al way do first dry run mean try do solve the question in the copy first.


fifth than make the program.


Sixth always solve the error using top down approach.


seven finally U know the pointers.
Reply:There are no algorithms of "pointer programs" that I know of.





A pointer is basically a description of an address. For instance, and this is a bit contrived, but if you gave someone your house, they would have your house. But if you gave them the ADDRESS of your house, then they could still get the house if they want, but they wouldn't have to carry around the whole house.





Basically pointers are addresses of places in memory, so if you want to pass along a chunk of memory representing the text of a book, you can either pass along the whole text - which might be huge, and time-consuming to pass - or you could just pass the ADDRESS of the text. If the recipient needs to get at the text, it's a small leap once you have the address, and it saves passing all that information around, which chews up resources.
Reply:Hi,





I found the following sites with a very good examples of Pointers using C and C++





http://cis.stvincent.edu/html/tutorials/...





http://www.cs.cf.ac.uk/Dave/C/node10.htm...





http://www.augustcouncil.com/~tgibson/tu...
Reply:Hi,


if u use an under-dos C, maybe code below will explain lot of things to u:





#include %26lt;stdIO.h%26gt;


#include %26lt;conStrea.h%26gt;





#pragma hdrstop





int add1(int* a, int* b)


{


return *a + *b;


}





int add2(int%26amp; a, int%26amp; b)


{


return a + b;


}





constream c;





void main()


{


int a, b;


a = 1;


b = 6;


c.clrscr();


c %26lt;%26lt; add1(%26amp;a, %26amp;b) %26lt;%26lt; endl;





c %26lt;%26lt; add2(a, b);


getch();


}








HTH,





niccie_11
Reply:Pointers are actually poniting where you r going to save u'r information in c language, thus they cannot be shown on the flowchart or define using algorithm





i used www.borland.com, micrsoft sites to understand how i can use the pointers, the r deficult but if u try hard u well be able to understand them easily,

survey for money

No comments:

Post a Comment