Question

You are writing a new program. What information should be contained in a comment block at...

You are writing a new program. What information should be contained in a comment block at the top of that program? Pretend that you are explaining this concept to a new student that has never programmed before.

Homework Answers

Answer #1

In the comment block the aim of the program should be stated.what is the purpose of the program should be mentioned clearly.

Example:

// the aim of the program is to add two numers And place the result in the third number

#include<stdio.h>

int main()

{

int a, b, c;

printf("Enter two numbers to add\n");

scanf("%d%d", &a, &b);

c = a + b;

printf("Sum of the numbers = %d\n", c);

return 0;

}

For this instance it is a small problem .there were large program having 1000 ' s of lines of code .for those program comments are very useful to understand the logic going on in the code

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Create a new project. Type in the following program. Add a comment at the top...
1. Create a new project. Type in the following program. Add a comment at the top to include your name and the date. 2. Compile and Run with different values. What data values should you choose? Think about what we discussed in class. 3. Add code to compute the modulus. Hint: you will also have to declare a new variable. //this program demonstrates the use of various operators #include <iostream > using namespace std; int main() { int num1; int...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output. Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by...
How do you determine whether a new program should be recommended for creation and funding? Do...
How do you determine whether a new program should be recommended for creation and funding? Do you approve a program with a favorable rate of return and net present value that exceeds the governmental entity’s internal rate of return? Or, do you approve a program that serves the needs of citizens, but may not create the desired rate of return?
This programming task will be a bit different. It will be more like what you would...
This programming task will be a bit different. It will be more like what you would receive if you were a maintenance engineer working in a corporate information systems or technology department. In other words, you will have some prebuilt source code provided for you that you must alter so it will meet the given programming specification.. Build a program from what you have been given as a starting-point. Rename the “starter code”. Do not add any modules; just, use...
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements....
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements. Read-It-All bookstore has a book sales club where customers can earn reward points that can be used for their next purchase. If a customer purchases 0 books, he/she earns 0 points. If a customer purchases 1-3 books, he/she earns 5 points. If a customer purchases 4-6 books, he/she earns 10 points. If a customer purchases 7-8 books, he/she earns 15 points. If a customer...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you start doing anything… This project involves implementing a simple university personnel management program. The program contains two different kinds of objects: students and faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of the object. For example, a student has a GPA, while a faculty has a title and department...
Galen's first program outcome is "Safe, Patient-Centered Care." Upon completion of this program, you should be...
Galen's first program outcome is "Safe, Patient-Centered Care." Upon completion of this program, you should be competent and able to deliver safe, patient-centered care to all your patients. Every course you take in this program should help you towards those goals. Please address the questions below: What did you learn in Microbiology that will help you deliver safe, patient-centered care? Are there any patient care behaviors that you have changed in your nursing practice this quarter as a result of...
Assignment #4 – Student Ranking : In this assignment you are going to write a program...
Assignment #4 – Student Ranking : In this assignment you are going to write a program that ask user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’...
Please comment on my answer, what do you think? I need insight, thank you! Q) Concerns...
Please comment on my answer, what do you think? I need insight, thank you! Q) Concerns of JIT: What do you think can be the top managers' concerns about the implementation of Lean or JIT? A) There can be a few concerns when it comes to implementing a Lean of JIT system. These processes of dependent on technology. That involves a lot of money and will there will be a need for people to understand how to use the technology....
Create a new NetBeans project (using Ant) titled YourNameExam2P3. 2. Pretend you are a malware author...
Create a new NetBeans project (using Ant) titled YourNameExam2P3. 2. Pretend you are a malware author and you are trying to come up with random-looking web domain names for your command-and-control viruses, e.g. “RDf-45dlfjxg7.com”. 3. First, you need to come up with some original criteria that define your domain name pattern. For example, “it should be 13 characters long, include 3 integers only, no lower case letters, and possibly end in .net or .edu”. You should come up with your...