Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose: Write a small program called pointerTester.c to experiment with pointers and a small program called reading c for strings Getting Started Change into the

image text in transcribed
Purpose: Write a small program called pointerTester.c to experiment with pointers and a small program called reading c for strings Getting Started Change into the cse220 drectory Create a new directory caled lab11 Change into the new directory Implement the programs below in your lab11 directory Using Pointers Create a program pointerTester c to experiment with pointers Implement the following stegs one by one in your program YOU NEED TO ANSWIR QUESTION Use printf to print your answers at the end(after 12). Declare three integer variables a, b and c. Initialize them to Q, 100 and 225, respectively 2. Print the value of each variable and its address. 3. Add the following declaration to your code: Print the value of each pointer and the value it points to (using the pointer) S Rum your program multiple times a Does any of the values "pA, "pB or "p change? b. Does any of the velues pA, p8 or p change? 6. Change the value that p points to to 50 without declaring the valuable that p points to Can you print the value that p points to? 7. Declare an array z of 10 integers and initialize its elements to. 1.2 8. Print the address of each element i, the array using the 21? notation 9. Print the address of each element in the array using the z+ i notation 9 Print the content of the array using 2 inotation 11. Declare a string Iineral x and set it to value hello 12. Change the second character of x to upper case. What happens? Strings Write a program reading.c that reads from standard input according to the users choice. The program should ask "How would you lke to read 1: character by character, 2: word by word 3: line by line Default print "Invald choice", You should write the three procedures below The procedure readCharbyChar asks the user to enter S characters and read them (hit %d The procedure readwordByword asks the user to enter S words and read them (hint usng %s! The procedure readUneByLine should ask the user to enter 5 lines and read them (hit In each of the three procedures, the values read should be printed to the screen each on a separate line showing: input index, tab, unit [char, word, or line). According to the user choice, yor program uses switch statement to call readOurbor. Make sure your code is propery indented, your variables have meaningful names, and macro definitions are used when appropriate. Submission Submit the following files through Goorle Clasvroom pointerTest.c, reading.c Use only these file name! Do not upload any other files These files can be submitted through the browser within 32Go. Remember to subrmit your file prior to the deadline as you won't be able to submit if the deadine has passed You should always venity that you submitted the correct files. As stated in the sylabus late work w not be accepted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions