Better understand the syntax of C

To program in C you need to follow some rules for the correct construction. Rules Work for functions, expressions, statements and types:

  • Types are the properties of the data used in a program.
  • Explanations are parts of the program where they give meaning to an identifier, allocating space in memory, define roles.
  • Functions are actions that a program must meet as running. The union of the various functions are basic operational entities in C.
  • Determination and modification of values, are called I / O functions defined by expressions.

There are functions that are already defined in C library, as printf () andscanf (), which respectively mean write on the screen and read the data entered. Despite the existence of these functions in the library, programmer can also create your own functions, which perform calculations or other.

Every C program starts with the mandatory function main () The comments are expressed by / * and * /, which are ignored in the program. Every statement that is closed, shall be used ; (Semicolon) that ends the line of inquiry.

Example of a basic structure:

main ()        / * function binding * /

{

printf (“Text”);

}

It’s the same example used in the first post, but with further explanation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.