• 0

practical Exercises for C?


Question

Does anyone know of any good links to some exercises on Pointers? I have tried google and it always turns up dud pages for me. Any help appriciated. I have done all the ones in my book and want to do more. I dont want to move on untill I feel I can handle them at a level I am comfortable with.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

One of the most direct applications of pointers are data structures. Try to learn what are single- and double-linked list, stacks, trees, etc. Doing so, you will see how pointers are commonly used, and you will also learn some crucial concepts in computer programming. With a quick Google search I got you http://www.academictutorials.com/data-stru...ntroduction.asp , maybe you can find something better though, didn't take much time to check.

Link to comment
Share on other sites

  • 0

String manipulation can also be educational. Can you write the shortest possible function that removes word number X from a string passed to it (in-place) using only pointer arithmetic and returns the length of the new string?

I.e the function to go with this declaration:

int remword(char *string, int number);

(This was an idea for the original poster, so don't everyone go and post suggestions! :p)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.