SparkNotes Shopping Cart  |     |  Checkout
Brought to you by Barnes and Noble
What Are Pointers?
  
 
Problems
Problem 2.1: Is the following piece of C code valid?
int main()
{
	int *steve;
	steve = &steve;
	return 0;
}
[Solution]
Problem 2.2: What is wrong with the following code?
int main()
{
	int *steve;
	*steve = 100;
	printf("%d\n", *steve);
	return 0;
}
[Solution]
Problem 2.3: Will the following code compile and run?
int main()
{
	int a = 5;
	a = *&*&*&*&a;
	printf("a is %d\n", a);
	return 0;
}
[Solution]
Problem 2.4: Will the following code compile and run?
int main()
{
	int a = 5;
	a = **&&a;
	printf("a is %d\n", a);
	return 0;
}
[Solution]
Problem 2.5: Why do we care about assigning the value NULL to a pointer when the pointer isn't being used? [Solution]
Help | Feedback | Make a request | Report an error | Send to a friend
 
Get clear, concise lessons from No Fear Math and get caught up.
More...
 
Learn Calculus in a flash! You’ll be amazed at how easy it is with Calculus Study Cards.
More...
 
 
Go to top