Activity 3.6.
Try putting a comment inside another comment, so something like/*This is /*comment inside a */ comment */. What happens when you nest a comment inside another comment?
Compile and run the code below in your own C environment.
#include <stdio.h>
int main(void) {
/* It is important to add comments to your code. */
/* There are two types of comments. */
/* This type of comment
an go over multiple lines if you wish. */
/* Or just one line - up to you! */
// This type of comment only affects the remainder of a line.
// Let's look at some examples.
/* This program prints a greeting to the screen.
It also tells you the day of the week. */
printf("Hello, World!\n"); // print greeting.
printf("Today is Monday!\n"); // print the day of the week
/* Note that comments show up in your source code in a different color. */
return(0);
}
/*This is /*comment inside a */ comment */. What happens when you nest a comment inside another comment?