CMIS 102 Interactive questionsBy Nicholas Duchon
Copyright 2014, updated 3/27/2014
Are the following declarations acceptable, and if not, why not?
Given the following variable declarations, are the assignment statements below acceptable? Of not, why not?
You should assume that all the variables have been given values before each of these statements is to be executed.
Declare ma, mb, mc, md as integer
Declare fa, fb, fc, fd as float
Declare ca, cb, cc, cd as charater
Declare sa, sb, sc, sd as String
Declare ba, bb, bc, bd as boolean
For the following programs, are they valid, or do they suffer from undeclared variable(s), or uninitialized variable(s)?
Write a program using global variables and modules (input, compute and display) to do the following:
Given the following program fragments, what are good sets of test values for the variables, and what values for the assigned variables should be expected?
You should also draw a flow chart for these program fragments.