Saturday, 17 September 2011

Episode 2 : Variable, Data Type


String Constants

A string constants is a sequence f characters enclosed in double quotes(""). The characters may be letters, numbers, special characters and blank space.
Example :

“He said, He is learning C program.”

If we write,
                   printf(“I am learning C pro.”);
                   printf(“He said,\”He is learning C.\””);
Then the output,
                   I am learning C pro.
                   He said, “He is learning C.”


Semicolon ( ; )

We know that program is group of statement. In C, when write a statement for any particular work then we use semicolon for separate from the other statement.

Suppose we write,
                             printf(“Shojib Org”)
Here we are not use semicolon in the end of statement so compiler take error for this statement.

We write,
                             printf(“Shojib Org”);
Here we use the semicolon in the end of statement. So compile not take error.


Written by "Shojib"

No comments:

Post a Comment