Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C/C++ Win32 Console Application solution in Microsoft Visual Studio In the proje

ID: 3775302 • Letter: C

Question

C/C++ Win32 Console Application solution in Microsoft Visual Studio

In the project Task5 implement all C/C++ functions which contain Inline Assembler instructions as full assembler procedures and place them in separate assembler module (in file with extension .ASM). To enable full assembler support in the Visual Studio: In the Solution Explorer window right click on the project name Task5 and from the context menu select: Custom Build Rules... - for Visual Studio 2008 Build Customization3... - for Visual Studio 2010 and newer In the dialog that opens make sure to mark the checkbox for item: Microsoft Macro Assembler - for Visual Studio 2008 masm(.targers, .props) - for Visual Studio 2010 and newer Demonstrate assembler module by calling procedures from the C/C++ code. TASK Implement: Count the number of odd values (n mod 2 0) for each row. Suggested template for assembler module: -586 model flat, C code SolutionForGrade7 PROC PUBLIC USES ... [LOCAL ...] ret SolutionForGrade7ENDP END

Explanation / Answer

Walkthrough: Working with Projects and Solutions (C++)

Visual Studio 2015

Other Versions

Here's how to create a C++ project in Visual Studio, add code, and then build and run the project. The project in this walkthrough is a program that tracks how many players are playing different card games.

In Visual Studio, work is organized in projects and solutions. A solution can contain more than one project—for example, a DLL and an executable that references that DLL. For more information, see Solutions and Projects.

Prerequisites

Creating a Project

To create a project, first choose a project-type template. For each project type, Visual Studio sets compiler settings and—depending on the type—generates starter code that you can modify later.

To create a project

You can accept the default location in the Location drop-down list, enter a different location, or choose the Browse button to browse to a directory where you want to save the project.

When you create a project, Visual Studio puts the project in a solution. By default, the solution has the same name as the project. You can change the name in the Solution name box, but for this example, keep the default name.

Choose the OK button to start the Win32 Application Wizard.

You now have a project, but it does not yet have source code files.

Pascal's Triangle has many surprising patterns and properties. For instance, we can ask: "how many odd numbers are in row N of Pascal's Triangle?" For rows 0, 1, ..., 20, we count:

row N: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
odd #s: 1 2 2 4 2 4 4 8 2 4 04 08 04 08 08 16 02 04 04 08 04

It appears the answer is always a power of 2. In fact, the following is true:

THEOREM: The number of odd entries in row N of Pascal's Triangle is 2 raised to the number of 1's in the binary expansion of N.

Example: Since 83 = 64 + 16 + 2 + 1 has binary expansion (1010011), then row 83 has 24 = 16 odd numbers.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote