Hi guys.
Welcome back.
In this section we will learn about the DNA types and variables in C language
types negatives are used to declare a variable.
It specifies a data storage format of a variable.
For example in space no followed by a semicolon here.
Number is a variable of you it.
OK so a number is a variable of indicative.
OK.
Similarly cast space need for the base in the colon here.
Name is a variable of character.
OK so this is how we need to declare the variables in the C language and there are types i n c.
There are three different types of questions the Prime Minister.
Then secondly the third one is user different effects.
OK.
Here are the most commonly used your types are primarily atoms which contains integer character float
numbers.
OK so we will discuss whether the variable for progress variable is the identity that is used to store
it at a value the variable may take a different value at different stages during the execution of the
program.
For example in space height here height is a variable of integer did it.
OK height is a variable of indeed it.
Similarly gas space to rent.
OK here student is a variable of capital.
OK so which means that down the line the program you'll be using these higher variable not to score
some integer values here.
You're going to use student variable in order to capture some of the character values you know don't
delay the program.
OK so this is how we need to declare in the programs.
Suppose like if you don't declare it undoubtedly if you use variables in the C program it metering compilation
error.
So this is a format or it is a syntax you know in order to declare the variables.
So we'll discuss further the data that I will come back in the yearly session.
We learn about the variables and the types that theoretically.
So here we will discuss further with the help of a program.
OK so this particular comment section on the entry file we have already discussed in the yearly lessons.
OK so we are Derrick Lee jump into the main program.
As I mentioned in my earlier session that the program will always starts from my main function.
OK so here you see just one experiences nothing but a variable between digital retirement are initialized
the value contents and employee's character variable variable I need to see and it has been it shows
you the value question and make sure it should be in there double quotes followed with a semicolon.
This is the syntax and we are using a four fold variable in strategy with this value and double variable
in insulins with this value.
Please note I suppose if you want to use the decimal values of until 7 starting from here.
Okay one two three four five six seven.
Okay you can use it.
Okay until 7 decimal values.
That is if you want to use and to 16 decimal points and then you can use double.
So one two three four five.
Okay make sure you should start from far from point okay.
Oh one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen
okay.
So it can print until sixteen or decimal points here for double that is flawed it can print until seven
decimal digits.
Okay so now we are just printing it.
Okay.
And the sequence also you're experienced is in digital value.
I'm going to print it.
So since I'm going to print that in digital type I'm jus just using the spare for my space based.
Make sure that like if it is in digital data then you have to use the format specificity for then.
OK.
And if you're printing a character value then you should be assessed for the Singapore.
Then if you're using a float variable if you want to print a float everybody had to use.
OK so here I mentioned a 16 because I want to print until 16 decimal digit digits.
OK.
So and they feel want to print the double value then we have to use f ok l for London f France.
OK it is a format specify.
OK.
So here I'm using 18 because I want to print undulating decimal points.
OK.
So no but right when you execute it.
One two three four five six seven Qantas here it should be cut and cut correctly until this value.
OK so here one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen
sixteen.
Sure it should but in turn turn this one
so we just looked at and say this also.
I just uh I didn't say so when you printed.
We should get this.
This really should be printed.
After that the value may change.
OK.
So written well written zero means it's a normal examination which we discussed in the lessons.
So now we will compile this program see what happens OK.
This is the output of the program.
OK.
Now what we have done is we just print whatever we have declared an inch lies to here.
We're just printing with the format specific date.
So then is perfectly print text as expected.
Again we are printing the employee variable value which is Steven.
So that is also printed successfully here.
So no problem.
So if a flawed as I mentioned earlier it can print until seven decimal digits.
Okay.
So which means it should print from three starting from these should print until 5 1 6.
So three point five 1 6.
Okay.
After this you see is the value changed to 0 6.
If you see after 6 there is it's 16 16.
But the value got changed now.
Well as I mentioned earlier it can print out 16 decimal points.
So here it is here it should print until double one double if you see here.
It's printing three point from here if you counted one two three four five six seven eight nine ten
eleven twelve thirteen fourteen fifteen sixteen.
Okay.
So double do it in 2016 print.
Mm hmm.
And this extended family values each print after the see the values getting change values getting changed.
Okay.
So this is how we can use the integer character float and double.
Okay.
MNC language this is how you need to know in this particular genotypes you know in the second zone so
make sure the four you make sure you use a character from a space where they're printing the variable
of a specific terror attack.
Okay.
Thanks for watching this viral video.
I'll catch you guys in the next session.
Bye for now.