Get premium membership and access questions with answers, video lessons as well as revision papers.

What are the guidelines to good C++ programming.

      

What are the guidelines to good C++ programming.

  

Answers


Kavungya
1) Ensure that the program logic design is clear and correct. Avoid starting to code before the logic is clearly set out since good logic will reduce coding time as well as result in programs that are to understand, error free and easily maintainable.
2) Declare all variables before using them in any statements.
3) Use sensible names for variables and avoid using variables names that are vague and may make debugging difficult. This however depends on the programmer’s ingenuity.
4) Use a variable name in the case that it was declared in.
5) Never use keywords in uppercase.
6) Terminate C++ declarations, expressions and Input / Output statements with a semi colon.
7) Restrict the variables names to eight characters. The compiler may truncate part of a variable name and possibly give it the meaning of another variable
8) Always save the program every time you make changes.
9) Proof read the program to check for any errors or omissions
10) Dry run you design with some simple test data before running the code, then
compare the two.
Kavungya answered the question on May 15, 2019 at 14:50


Next: Describe programming in C++
Previous: Explain the features of a C++ program.

View More Computer Programming Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions