Question: The simple counting program studied in last week's lecture is shown bellow. #include #define STOP 0 / * Function: main Description: counts down from user
The simple counting program studied in last week's lecture is shown bellow.
#include
#define STOP
Function: main Description: counts down from user input to STOP
int main
variable declarations int counter; an integer to hold count values
int startPoint; starting point for countdown printf Enter a positive number: ; prompt user for input
scanf d &startPoint; read into startPoint
count down and print count
for counterstartPoint; counter STOP;
Among the following statements, which one is NOT TRUE?
Question Answer
a
The value returned by the main function can be used to assess the execution status when exiting the program.
b
The preprocessor directive #include is mandatory to use printf and scanf functions.
c
Each element printed in the for loop is printed on a new line.
d
A macro defined by the directive #define cannot be modified by the program.
e
Two integer variables, counter and startPoint, are declared and initialised to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
