Category
đź“š
LearningTranscript
00:00Hello everyone this is sandeep today I am going to explain about type specifiers.
00:09So if you see inside the scanf %d %d and you can see here in the printf also %d these are
00:18known as type specifiers %d represents for integer values %f represent for float value
00:29%c represents for character value %s represents for string value.
00:39So why to use specifier and what is the purpose of it that I am going to explain.
00:46Why don't we directly use the variables with the scanf function or with the printf function
00:56why it is essential to first write specifier and then use the variables that I am going
01:04to explain.
01:06I am going to explain with one of the realistic approach example and the things will be more
01:12clear to all of you with this example.
01:17We all know about the traffic lights and we know that with the traffic signals we able
01:24to decide that what we have to do.
01:30If it's red color then you have to stop if it's green then you can cross the road.
01:37So on the basis of the traffic signals we decide.
01:40Traffic signals actually specifies us or indicate us that what we have to do.
01:49If it's a red color signal so this vehicle will stop it's coming it's going to stop.
01:58If it's a green color signal so this vehicle is going to cross.
02:05So with the help of traffic signals these traffic signals are type specifiers with the
02:12help of the specifiers we able to decide that what we have to do.
02:19In the same way in the programming also these specifiers indicate or specifies that what
02:31type of value is going to store inside the variables.
02:36If it is %d so it specifies that integer values is going to store inside this a and
02:44b variables or if it is used with the specifier is used with the printf then integer value
02:52is going to display.
02:56Type specifier also decides if it is used for two times as it is used here two times
03:03So the type specifier also decides that two values are going to store the first value
03:10inside the a and the second value is going to store inside b.
03:14So I hope you understand about the type specifier in the next video I'm going to explain something
03:20else.
03:21Bye.