Review the given c code and perform analysis as needed

Assignment Help C/C++ Programming
Reference no: EM131112085

Fix C Code

The attached code, developed by a junior developer, has several issues and is not functioning as expected. The desired functionality of the program is to allow a user to select from several choices on a menu. After the user selects the "Exit" option from the menu, the program will populate a password with ‘1's and then display the value of the password. The program also captures a character so the screen can stay paused for review before exiting. Below are screen shots for a successful program execution.

Unfortunately, not only are there security issues, the code you are provided doesn't work as expected.

Carefully, review the code and perform analysis as needed. Consider the following rules and recommendations and hints for items that you might want to review.

Note, that some rules and recommendations listed below may not be found as issues in the code.

• STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator.
• MSC24-C. Do not use deprecated or obsolescent functions.
• FIO34-C. Distinguish between characters read from a file and EOF or WEOF.
• MSC17-C. Finish every set of statements associated with a case label with a break statement.
• MSC33-C. Do not pass invalid data to the asctime()function.
• MSC17-C. Finish every set of statements associated with a case label with a break statement.
• DCL20-C. Explicitly specify void when a function accepts no arguments.
• MEM30-C. Do not access freed memory.

You must use Visual Studio for C compiling.

Review and analyze the code, and determine the rules and recommendations that are violated, you should fix the code. Be sure to document each issue by aligning the rule or recommendation and explain exactly how you fixed the issue.

Tip:

1. Be very careful with the pointers and memory limits of the arrays. Most modern compilers attempt to protect your system resources, but you could potentially produce access violations that could lock your system up. Take your time and review the memory bounds for all of your arrays before your start making code changes

Submit:

Provide your fixed C source code along with a word document describing how you addressed each issue. For example, you should list the C Cert rule or recommendation for each issue and show and describe the code that addresses the issue. You should also provide screen shots and descriptions of the successful execution of the code. All references used should be included in your document.

Attachment:- C_Code.zip

Reference no: EM131112085

Questions Cloud

Determine the allowed range of the diameter of copper core : A copper-silver bimetallic wire, 1 cm in diameter, is prepared by co-extrusion with copper as the core and silver as the outer layer. The desired properties along the axis parallel to the length of the bimetallic wire are as follows: Thermal condu..
Process of designing goods and services : Summarize the process of designing goods and services, and explain where the process differs between goods and services.
Frequently enfold the biases : At least One page. This week's discussion thread is: How do you make valid strategic decisions given the reality that 1) data are usually of unknown reliability, 2) frequently enfold the biases and/or perspectives of the people who created them 3)..
Production of an online service : The following table shows the capacity required (in thousands of unspecified units) for the production of an Online service over the next 18 months.
Review the given c code and perform analysis as needed : Carefully, review the code and perform analysis as needed. Consider the following rules and recommendations and hints for items that you might want to review.
New offices at atlantic management systems : Atlantic Management System is a consulting firm that specializes in developing computerized decision support systems for computed manufacturing companies.  The firm currently has offices in Chicago, Charlotte, Pittsburgh, and Houston.  It is consi..
Calculate the value of a 5000 par value bond paying quartely : Calculate the value of a $5,000-par-value bond paying quarterly interest at an annual coupon interest rate of 10% and having 10 years until maturity if the required return on similar-risk bonds is currently a 12% annual rate paid quarterly.
According to the american diabetes association : According to the American Diabetes Association, "In 2012, 29.1 million Americans, or 9.3% of the population, had diabetes." Diabetes Mellitus can be a very debilitating disease as it can affect many organs in our body.
Developing an evidence-based argument : This part of the assignment will focus on developing an evidence-based argument to support your position on a particular topic. Be sure to use additional resources to support your paper. In a 2-page paper, make an argument on one of the prompts be..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd