C Programming

Practise Exercise 10: Pointers

JavaScript compatible inter-active version of this test.

1. Declare a pointer to an integer called address.

2. Assign the address of a float variable balance to the float pointer temp.

3. Assign the character value 'W' to the variable pointed to by the char pointer letter.

4. What is the output of the following program segment?

	int  count = 10, *temp, sum = 0;

	temp = &count;
	*temp = 20;
	temp = ∑
	*temp = count;
	printf("count = %d, *temp = %d, sum = %d\n", count, *temp, sum );

5. Declare a pointer to the text string "Hello" called message.


ęCopyright B Brown. 1984-1999. All rights reserved.