From the course: C Programming Basics: Flow Control, Variables, and Pointers

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Challenge: Create a char pointer

Challenge: Create a char pointer

(intriguing music) - [Instructor] In this challenge, you flex your pointer muscles. Your task is to create a new source code file that performs five operations on three character variables, A, B, and C, and one pointer variable, P. Assign the letter A to variable A. Initialize pointer P to variable A. Assign variable B the value stored at pointer P. Initialize pointer P to variable C. assign the pointer P the letter Z. When this activity is complete, use a printf statement to display the values of variables, A, B, and C. I realize that there are a lot of steps, so you can use exercise file 05-04_challenge to help you get started. It should take you about 10 minutes to complete this challenge.

Contents