Lesson 1 : Getting Started With C

Now all you guys know why you should be starting with C and then Getting to C++ lets begin our 1st lesson for C. We all know very well that C is a language and a language have some alphabets, combination of which results in words and then several words together create sentences. So , there is the case with the C, C has got keywords, and identifiers, combination of which results in the statement and if the statement is correct then C executes it without error.
You guys now might be wondering that what are keywords and identifiers, don't worry i'll tell you what they are and how to use them. Keywords are predefined C words that have already defined meaning like int, which means a integer is being defined. There are many Keywords that you will get to know as we will proceed. Now, Identifiers, are those words which are defined by the programmer, that is, you to store some values. It could be any word other than keywords. There are few rules for defining Identifiers that you should keep in mind while defining them.They are :

  1.  A variable name(identifier) is any combination of 1 to 31 alphabets, digits or underscores.
  2. The first character in the variable name must be an alphabet or underscore.
  3. No commas or blanks are allowed within a variable name.
  4. No special symbol other than an underscore (as in gross_sal) can be used in a variable name.
Now you all might be wondering what are the use of these identifiers(variables). Well, as i said earlier they are used to store values so if we need to retrieve that value again we need to know the address of the value and thus to get that very same value we need we create identifiers.

Values stored under identifiers are of five types and these types are called data types. They are 
  • Character(char)
  • Integer(int)
  • Real Number(float)
  • Double(extended Float)
  • Void
I am going to define each of this before finishing this weeks lesson.
Character : This type of variable is used to store words or alphabets like mango, ant, a. If a single inverted comma is put before and after the alphabet it will store its ASCII value. 
e.g  char 'd' will be give the value 100.
Integer : This type of variable is used to store integer value that is 1,43, 32 
Float : This data type is used to store real values like 1.232, 43.22 and so on.
Double : It is same as Float but with extended decimal points
Void : This is an empty data type.

Hope you get all the details for this chapter, grasp it well as it will form the basic for you serious programming objectives.

Comments

Popular posts from this blog

Lesson 2 : First C Program

Introduction To C