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 0
/* 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 ("8d", &startPoint); // read into startPoint
// count down and print count
for (counter=startPoint; counter >= STOP;
Among the following statements, which one is NOT TRUE?
Question 6 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 0.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!