[Previous Homework]
[Next Homework]
From Linux on the GL machine:
hw04 - Variables
From Linux on the GL machine:
-
Create a text file named
Variables.txt
in your ./cmsc104/hw04
directory
Answer each of the questions below. Number them as they are below. ONE answer per line.
Use the SUBMIT utility turn in the homework.
submit cs104_grasso hw04 Variables.txt
-
For each of the following, indicate whether they are: 1) reserved word 2) legal indentifier 3) illegal identifier
-
MIN_COOKIES
date
123xwy
H
void
homework#2
Mike's
"int"
return
When_Johnny_Comes_Marching_Home_Again_Hurrah_Hurrah
#include
float
Write the following numbers in normal decimal notation
-
222e-3
1.2345e+3
123.45e+5
Write the following decimal numbers in C scientific notation
-
1300000
.12345
0.00529
Write declaration statements that would declare and initialize variables for the following data using the datatypes of
int
, double
or char
. For example: If you are given the data 2 , the declaration statement would look like int feet = 2;
If the data itself is not in a legal C format, say "illegal". Make sure that the variable names you pick are legal and follow conventions.
-
41
-37.491
"T"
12E-5
'z'
.912
4,179
'RISE'
'true'
@
'@'