Why Use Pointers?


Problems

Problem : Write a function which takes an integer n, allocates space for a string of n characters, and returns a pointer to that space.


Problem : Write a function which allocates an array of n integers, where n is a parameter to the function.


Problem : Write a function int **create_2d_array(int x, int y) which allocates a two-dimensional array of size x by y and returns a pointer to it.


Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.

Do energy juices actually work?

Our blogger puts 'em to the test!


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps