In: Computer Science
1, Write an appropriate compile-time initialization for a memory location named courseNumber. Store CS 158 as the initial value in the memory location. ______________________________
2, To declare a memory location to store the town where you were born, you would write _______________________. The identifier (memory location name) you should use is homeTown. It follows the rules for naming identifiers. Be sure to end your declaration with a semicolon.
3, The default data type used for floating point values is __________. You could store the amount of money in your checking account in this memory location.
4,To create a memory location to store the count for the number of correct responses use the ____________ data type.
5,Write an appropriate compile-time initialization for a memory location named lastQuestion that could store true or false as a boolean in the memory cell. ________________________
This is from my computer science c# class
1) As the value to be stored is 'CS 158' which is alpha neumeric, it is good to store the value in string as follows
string courseNumber ="CS 158";
2) string is used to store the hometown name.
string homeTown;
3) Default data type in c# to store real numbers are double
4) int (integer) can be used to store the count in c#
5) bool is the keyword used to create boolean variables in c#
bool lastQuestion=true;
The above statement will initialize lastQuestion variable to true . Defualt value of boolean variable in c# is false