UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

8.7.3.  Input/output operations and memory management

Resources

  • Subfolder Using_scanf_and_memory in the shared folder.

Work Plan

We are going to do a very simple program that lets a user to insert words and print them out on the screen. The program will ask the user to introduce the size of the word he/she is going to write. Once obtained, the program will allocate the adequate memory space and then it will ask the user to insert the word. After that, the program will show the word on the screen. These steps will be done inside a loop till the user specifies the size of the word to insert as 0. Update your program in the Using_scanf_and_memory folder.

Use scanf to get the user data, printf to show them and, for the memory allocation, use the more convenient function.

When finished, upload the latest version to Subversion.