What is comment ? Explain why compilation is necessary before execution of a program ?
can ayone tell me what is comment and explain why compilation is necessary before execution of a program in brief .
can ayone tell me what is comment and explain why compilation is necessary before execution of a program in brief .
2 Answer
Umesh Sanjyal . 4 days ago
Comments are lines or sections of the program code that is not running. To explain the code, easier to read and provide notes for the future reference. Comments are ignored by compiler or translator.
The compilation of the source code conversion process (written in a high -level programming language such as C, C ++ or Java) to the device code (binary code) is that the computer processor can understand and execute. Why the compilation are required here are some point :
Dewesh B.T . 4 days ago
In programming, a comment is a passage of text that is included into the code to describe its functionality and make it easier for the programmer or others to comprehend afterward. The compiler or interpreter ignores comments while the program is running, and they have no practical use. They are particularly helpful for pointing out errors or potential fixes, improving the readability of the code overall, and explaining the intent behind intricate code segments.
The process of turning developer-authored high-level programming code (like that written in C, C++, or Java) into machine code that a computer can comprehend and run is called compilation. Because computers run on binary machine code rather than immediately understanding high-level languages, this step is required. Program execution is impossible without compilation since the code cannot be converted into a format that the computer's processor can understand. Compilation serves as a link between machine-executable instructions and human-readable code.
#include
int main() {
// This is a comment: the next line prints "Hello, World!" to the screen
printf("Hello, World!\n");
return 0;
}