C programming skills. You may select a problem/task of your choice and design an
ID: 3634967 • Letter: C
Question
C programming skills. You may select a problem/task of your choice and design and code a program that implements your solution/application. The programcan run
? ? ? ?
?
on a platform of your choice. The requirements for full credit are:
Include a brief (1 - 2 paragraphs) description of the program’s purpose. Include a listing of the code. Include sample output from the program showing typical and atypical operations Include in a non-trivial way at least two of the following C features in your program. Additional credit will be awarded for using more than two aspects.
o Files (text or binary) o Structs and/or unions o Pointers and dynamic memory o Bitwise operators and/or bit fields o Sorting and searching o Numerical methods such as numerical integration, summing a series, prime factoring
etc. o Two (or more) dimensional arrays o Parsing a text input. o Another advanced feature of your choice with professor’s approval.
Identify in your code where the above features are used.
Explanation / Answer
Using Microsoft Visual Studio for Simple C Programs A free version of Microsoft Visual C++ Express is available in: http://msdn2.microsoft.com/en-us/express/aa700735.aspx To edit your C program: From the main menu select File -> New -> Project In the New Project window: Under Project types, select Win32 - Win32 Console Application Name your project, and specify a location for your project directory Click 'OK', then 'next' In the Application Wizard: Select Console application Select Empty project Deselect Precompiled header Once the project has been created, in the window on the left hand side you should see three folders: Header Files Resource Files Source Files Right-click on Source Files and Select Add-> New Item Select Code, and give the file a name The default here will be a file with a *.cpp extension (for a C++ file). After creating the file, save it as a *.c file. To compile and run: Press the green play button. By default, you will be running in debug mode and it will run your code and bring up the command window. To prevent the command window from closing as soon as the program finishes execution, add the following line to the end of your main function: getchar(); This library function waits for any input key, and will therefore keep your console window open until a key is pressed.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.