This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Name: Smrithi Prem User ID: smp312 Date: 2 September 2008 Assignment Name: HW 1 Lab instructor: Gaurav Gulati Section:8 1. The output of the program is: a) c= 8.29 b) c= 2.32787 c) c= -8.36786 d) c= -12.2944 e) i2 = 9 f) i2= 1 g) i2= 4 h) c= 0.00328638 i) c= 2.37483 Press any key to continue… 2. State which of the following are valid C++ variable names. If they are not valid, explain why. a.) 2a : invalid variable name, since all C++ variables must begin with either an underscore or a letter. b.) k.4 : invalid variable name, since C++ may not contain characters other than numbers, letters, and the underscore. This variable contains a period and therefore is not valid. c.) pTxy1 : this is a valid C++ variable since it starts with a letter, and only contains letters and numbers. letters and numbers....
View Full Document
This note was uploaded on 09/09/2008 for the course ENGR 001 taught by Professor Dr.smith during the Fall '08 term at Lehigh University .
- Fall '08