Programming style:-
x=y+1;
z=a+x;
can be written on one line as a=b; x=y+1; z=a+x;
{
printf("Hello C");
}
can be written in one line as
main() { printf("Hello C"); }
- C is a free form language.
- Write the program in lowercase letters. C program statements are written in lower case letters. Uppercase letters are used only for symbolic constants.
- Braces ({&}) groups program statement together and mark the beginning the end of function.
- A proper indentation of braces and statements would make a program easier to read and debug.
- Since C is a free-form language, we can group statements together on one line.
- The statements:
x=y+1;
z=a+x;
can be written on one line as a=b; x=y+1; z=a+x;
- In the program:
{
printf("Hello C");
}
can be written in one line as
main() { printf("Hello C"); }
- This style makes the program more difficult to understand and should not be used
I really liked your Information. Keep up the good work. Home Movie Transfer Service in Canada
ReplyDelete