Lab objectivenbspnbspin this lab students will define basic


Lab Objective:  In this lab, students will define basic programming concepts, create coding segments based on specific scenarios, and debug programs using Visual Studio 2015.

Resources required:

Hardware:  Xendesktop

Software: Visual Studio 2015

Part 1:

Instructions

Please provide short answer explanations to the questions down below.  Include C syntax were noted.

  1. Explain the difference between storing text as a string versus in a character array. How can characters stored in each be manipulated
  2. Describe how the following Input/Output Functions work: fgets(), putchar(), getchar(), and puts().
  3. Chapter 8 in your textbook discusses different functions that can manipulate and search strings of data. Please list and explain one.  Include the header file that is coincides with and provide a real world example of when you would use it.
  4. In regards to output, what is a formatted control string? Please define its characteristics:  conversion specifiers, flags, field widths, precisions, and literal characters. Provide a syntax example.
  5. When reading formatted input using a scanf() statement we have to make sure that we include the correct conversion specifier which needs to match up with the variables declared datatype. Please name the data types that correspond with the following conversion specifiers:  %d, %c, %s, %f, and %p.

Part 2: Instructions

Open your Visual Studio 2015 XenDesktop image, create a new project, and type the coding segments down below into the source file.  Run the program(s) (Debug > Start without debugging).

  1. Execute the following code and identify the errors in the program. Debug the program and provide the correct version of the code.
  2. Execute the following code and identify the errors in the program. Debug the program and provide the correct version of the code. Note:  Be sure to check the output screen to see if the correct values are displaying according.
  3. Execute the following code and identify the errors in the program. Debug the program and provide the correct version of the code.
  4. Execute the following code and identify the errors in the program. Debug the program and provide the correct version of the code. Be sure the output looks exactly like the screen shot below.
  5. Execute the following code and identify the errors in the program. Debug the program and provide the correct version of the code. Adjust the code to look like the output in the screen shot.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Lab objectivenbspnbspin this lab students will define basic
Reference No:- TGS02202584

Now Priced at $30 (50% Discount)

Recommended (92%)

Rated (4.4/5)