Monday, November 3, 2014

Semicolons and Comments in C language:

Semicolons are very important in C programming language. They are used as terminators.
They are used to terminate a statement. They are used at the end of every statement. You will get an error if you forget to add semicolon at the end of every statement.

In C program, the semicolon is a statement terminator. That is, each individual statement must be ended with a semicolon. It indicates the end of one logical entity.
For example, following are two different statements:
printf("Hello, World! \n");
return 0;

Comments are used in C language for better understanding of the program. Comments are like helping text in your C program and they are ignored by the compiler. They start with /* and terminates with the characters */ as shown below:

/* my first program in C */

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Geek Fixes. Powered by Blogger.

Translate

- Copyright © Geek Fixes -Amazing Wallpapers- Powered by Blogger - Designed by Adeel Sarwar