Introduction To C Language
INTRODUCTION The programming language ‘C’ was developed in the early 1970s by Dennis Ritchie at Bell Laboratories. Although C was initially developed for writing system software, today it has become such a popular language that a variety of software programs are written using this language. The greatest advantage of using C for programming is that it can be easily used on different types of computers. Many other programming languages such as C++ and Java are also based on C, which means that you will be able to learn them easily in the future. Today, C is widely used with the UNIX operating system.
C IDENTIFIERS AND KEYWORDS
Every word in a C program is either an identifier or a keyword. Identifiers Identifiers are basically names given to program elements such as variables, arrays, and functions. They are formed by using a sequence of letters (both uppercase and lowercase), numerals, and underscores. Following are the rules for forming identifier names: ∑ Identifiers cannot include any special characters or punctuation marks (like #, $, ^, ?, ., etc.) except the underscore “_”. ∑ There cannot be two successive underscores. ∑ Keywords cannot be used as identifiers. ∑ The case of alphabetic characters that form the identifier name is significant. For example, ‘FIRST’ is different from ‘first’ and ‘First’. ∑ Identifiers must begin with a letter or an underscore. However, use of underscore as the first character must be avoided because several complier-defined identifiers in the standard C library have underscore as their first character. So, inadvertently duplicated names may cause definition conflicts. ∑ Identifiers can be of any reasonable length. They should not contain more than 31 characters. (They can actually be longer than 31, but the compiler looks at only the first 31 characters of the name.)Keywords
Like every computer language, C has a set of reserved words often known as keywords that cannot be used as an identifier. All keywords are basically a sequence of characters that have a fixed meaning. By convention, all keywords must be written in lower case letters.
ALL Keywords in C language
auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int long , register, return, short, signed, sizeof, static, struct, switch, typedef, union, unsigned, void, volatile, while
All the other thing we will learn in future tutorials.
0 Comments