C language was created by "Dannis Richie" in 1970 at "bell lab". C Language is the base of many languages:
1.B language2.COBOL language
3.Pascal language
That is it depends on :
1.Lower case and
2.Upper case.
Now in different countries different languages are spoken so a language is composed of letters (for e.g. in English a,b,c etc.) Just like these languages C language is composed of letters,characters,numerics,special character's etc.
Now I will give the description of these letters , special characters etc.
1.Characters: It include characters of English that is from A(capital) to z(small). So a total of 52 characters are used in C language.
2. Numerics: In C language a total of 10 numerics are used that is from 0 to 9.
3. Special symbols: Special symbols include (),[],{},#,$,%,&,@,*,!,?,",'',-,+etc. So a total of 29 special symbols are used in C language which we will discuss in our next classes.
4. Formatting characters: So a total of 5 formatting characters are used in C language and few of them are backspace, enter etc. and others characters we will discuss in our upcoming session when we start making programs.
Since these are the characters , symbols which are used in C language beside these there are two special symbols which are not used commonly and these are @ and $.
NOTE:--
In todays world C language is not commonly used because now different other type of languages i.e. high level languages are used for programming.
Output Manipulaters
There are some characters with special symbols which when used together give us a special symbols which are used to manipulate the output of a given program these are called output manipulaters. Some of them are discussed below:
1. \n (new line character)
Now we will understand the meaning of this manipulater.
Now take an example in which we have to print the value of three no's simultaneously.
Let three no be
a=5
b=10
c=15
Now if we need to print these as output we will do as:
Note:-- this is just an example in this we will not understand the programming if u r new so just understand the meaning of the manipulates and nothing else.
Printf("%d%d%d",a,b,c);
The output come out to be as 51015.
So by this output we will not able to understand what is the value of a ,b ,c because it gives us output as a no. which cannot be understand by anyone.
So let us use the first manipulater as:
Printf("%d",a);
Printf("\n");
Printf("%d",b);
Printf("\n");
Printf("%d",c);
And the output comes out to be as :
5
10
15
Now it is the correct way or we can say that it manipulates our output.
2. \t (tab space)
We will use it as in the same way as in the above example, so take the above example.
Printf("%d",a);
Printf("\t");
Printf("%d",b);
Printf("\t");
Printf("%d",c);
And the output comes out to be as
5 10 15
ultimately it changes the our output, so it is also a output manipulater.
White Spaces
Since when we perform our programs in softwares ,it is a blue screen the program is written in the screen and the spaces which left out are called white spaces.
Use of white spaces:
These spaces are used to write comments (i.e. in oder to describe the program) also to make program user friendly.
There are two types of ways to write white spaces in a program and these are:
1. Single line : which are used when we have to use only one line. It is represented as //.
2. Multiple line: which are used when we have to use multiple lines. It is represented as /*.
If u running ur program in a software the words written after /*are printed as it is but if wanted to start our program after this we have to close it as*\ then we can start our program.
Any questions please write it in the comments and I will try to solve it.
By sudhanshu tidyal
Comments
Post a Comment