All comments should be written in-----------
- AEnglish
- BFrench
- CC++
- DJAVA
The guideline is that all comments are written in English.
MCQs, short and long questions from lecture 30.Lecture 30 ki MCQs, short aur long sawal.
6 MCQs · 6 short questions · 6 MCQs from past papers6 MCQs · 6 short sawal · 6 MCQs past papers se
All comments should be written in-----------
The guideline is that all comments are written in English.
Comments are not syntax checked
The compiler ignores comments, so their content is never syntax checked.
Comments should NOT be indented relative to their position in the code
Comments should be indented relative to their position in the code.
Which of the following shows a commented statement in C++
// starts a single-line comment in C++.
Which of the following is used for multi level commenting?
/* ... */ can span several lines.
Which indent size eliminates the chance of code lines splitting?
The guideline recommends a basic indentation of 2; larger indents increase line splitting.
No MCQs match this filter.Is filter mein koi MCQ nahi.
Why comments are required to be indented and how it should be done, explain with one example?
Comments should be indented relative to their position in the code so that they line up with the code they describe; this keeps the layout readable and shows which block the comment belongs to. Example: while (true) { // Do something something(); } is correct, whereas putting "// Do something" at the left margin inside the loop breaks the logical structure.
Give three general rules for avoiding split lines.
When a statement must be split over lines: 1) break after a comma; 2) break after an operator; 3) align the new line with the beginning of the expression on the previous line.
How Comments should be indented relative to their position in the code? Give an example
Comments should be indented to the same level as the code they describe, not placed at the left margin. while (true) { // Do something something(); } NOT: while (true) { // Do something something(); }
Why Special characters like TAB and page break must be avoided? Explain
TAB and page-break characters are interpreted differently by different editors, printers, terminal emulators and debuggers, so in a multi-programmer, multi-platform environment they break the layout and cause problems; spaces should be used instead.
HOW COMMENTS BE INDENTED?
Comments are indented to the same level as the code they describe: while (true) { // Do something something(); }
WHY SPECIAL CHARACTERS TAB AND BREAK PAGE BE AVOIDED?
TAB and page-break characters are interpreted differently by different editors, printers, terminal emulators and debuggers, so in a multi-programmer, multi-platform environment they break the layout and cause problems; spaces should be used instead.
No long questions added yet.Abhi koi long sawal shamil nahi.