【First acquaintance with C language】Notes

1. The meaning of comments

(1) Unnecessary code in the code can be deleted directly or commented out.
(2) Some codes are difficult to understand, you can comment them.

2. Two annotation styles

2.1 C language comment style

/*xxxxxx*/ You can comment one or more lines at a time, but you cannot nest comments.
eg:

#include <stdio.h>

int main()
{
    
    
/*      printf("%Hello world!");
	/*printf("%Hello world!");
	printf("%Hello world!");*/
    	printf("%Hello world!");    */   //未被注释
    	
	return 0;
}

2.2 C++ comment style

//xxxxxxxx can comment one or more lines at a time, and comments can be nested.
eg:

#include <stdio.h>

int main()
{
    
    
	//printf("%hello world!");
	//printf("%hello world!");
	//printf("%hello world!");
	//printf("%hello world!");

	return 0;
}

Guess you like

Origin blog.csdn.net/m0_46630468/article/details/113406698