He Program in Visual C++ 6.0.

Submitted by: Submitted by

Views: 129

Words: 333

Pages: 2

Category: Societal Issues

Date Submitted: 12/06/2012 09:00 PM

Report This Essay

Lab

Preliminaries

For this tutorial, you are required to form a group of 3 to 5 students to discuss and present your views on the following questions.

Question 1

Copy the following programs, compile, and execute the program in Visual C++ 6.0. Execute the program for multiple times to make yourself comfortable with the environment of Visual C++ 6.0.

Question 2

Modify the program given in Question 1 so the output of the program is:

Question 3

Identify which of the following are valid identifiers, invalid identifiers, or keywords.

|Int |Length |

|_int |1_and_2 |

|@email |main |

|First.Name |string |

Question 4

With the help of the Visual C++ 6.0 debugger, identify syntax error found in this program and try to rectify the errors.

Question 5

With the help of the Visual C++ 6.0 debugger, identify syntax error found in this program and try to rectify the errors.

Question 6

Type the following program and observe the output of the program. NOTE: Be precise on the syntax.

Extra Question 1

Use the technique of reading input from user show in the program given in Question 1, and the technique similar as Question 6, write a program that will get an integer number from user and then display the result of that number raised to the power from 0 until 5. The following is the sample output of the program:

-----------------------

#include

#define CM_PER_INCH 2.54

void main()

{

float inches, cm;...