Only use this if you have a forms compatible browser [Note: You must have an Internet connection in order to have these tests marked]
1. Declare a pointer to an integer called address.
int address; address *int; int *address; *int address;
2. Assign the address of a float variable balance to the float pointer temp.
temp = &balance; balance = float temp; float temp *balance; &temp = balance;
3. Assign the character value 'W' to the variable pointed to by the char pointer letter.
'W' = *letter; letter = "W"; letter = *W; *letter = 'W';
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 );
count = 2, *temp = 10, sum = 10 count = 20, *temp = 20, sum = 20 count = 10, *temp = 2, sum = 10 count = 200, *temp = 0.2, sum = 1
5. Declare a pointer to the text string "Hello" called message.
char message = "Hello"; *message = "Hello"; char *message = "Hello"; char message = 'Hello';
To submit your comments, press this button:
To clear the form, press this button:
©Copyright B Brown. 1984-1998. All rights reserved.