1 00:00:00,150 --> 00:00:04,570 I welcome everyone to the new unit of our C++ programming tutorials. 2 00:00:05,040 --> 00:00:12,780 So let's start with any new topic today, so we are going to discuss regarding data types and control 3 00:00:12,780 --> 00:00:15,150 statements in C++. 4 00:00:15,190 --> 00:00:16,800 So let's dive into the topic. 5 00:00:17,980 --> 00:00:27,940 So there are a lot of components in our C++ programming language, which actually constitutes C++ programs, 6 00:00:28,360 --> 00:00:31,360 and we call these components all kinds. 7 00:00:32,560 --> 00:00:38,620 So talking about tokens, we have mainly five tokens in C++ programming language. 8 00:00:39,310 --> 00:00:47,710 So the names are keywords, variables, constants, special characters and operators. 9 00:00:47,710 --> 00:00:51,280 So these are the five main tokens in C++. 10 00:00:51,490 --> 00:00:58,450 So when we write this C++ programming language, some kind of programs in this language, we will be 11 00:00:58,450 --> 00:01:05,890 using a lot of tokens, which are these components which actually constitute a snap program. 12 00:01:07,330 --> 00:01:14,620 So each of the Dogon have a particular usage and why we use the token. 13 00:01:14,800 --> 00:01:17,590 So that's what we are going to discuss next. 14 00:01:18,370 --> 00:01:25,270 So before moving to that, we should know the types of tokens which are actually defined in C++. 15 00:01:25,840 --> 00:01:30,430 So we have keywords which are there to serve words with fake set meanings. 16 00:01:30,850 --> 00:01:39,040 So suppose if we want to declare something or say something to the computer through a programming language, 17 00:01:39,490 --> 00:01:45,730 there should be some words which are reserved which should give that particular meaning to the compiler. 18 00:01:45,880 --> 00:01:46,180 Right? 19 00:01:46,570 --> 00:01:54,790 So these keywords are these words which are served with basic meanings, which can make the computer 20 00:01:54,790 --> 00:01:57,490 to do something are called keywords. 21 00:01:58,510 --> 00:02:08,590 Similarly, we use a lot of variables which other data storage finds in a programming language. 22 00:02:08,800 --> 00:02:16,330 So if we declare a medium where we will be using that variable to actually store some data, so we use 23 00:02:16,870 --> 00:02:19,710 another set of token scoring variables. 24 00:02:20,530 --> 00:02:27,590 Now we do have a third set of tokens, which are called constants whose values will not change throughout 25 00:02:27,590 --> 00:02:28,960 the execution of the program. 26 00:02:29,530 --> 00:02:37,150 So suppose if we declare a constant value in a program toward that start to the end of the program, 27 00:02:37,450 --> 00:02:40,450 the values of that particular constant will not change. 28 00:02:41,550 --> 00:02:45,660 Then we have special anecdotes and operators. 29 00:02:46,380 --> 00:02:52,170 So let's move to each and every of these documents one by one, then you will get more idea on that 30 00:02:52,500 --> 00:02:53,070 Dawkins. 31 00:02:55,710 --> 00:03:05,970 So here C++ have up to like more than 100 the search keywords, which have a specific meaning. 32 00:03:06,720 --> 00:03:07,170 So. 33 00:03:09,890 --> 00:03:12,410 If I'm going to. 34 00:03:16,580 --> 00:03:20,720 Some of the famous Dawkins supports Break. 35 00:03:21,810 --> 00:03:22,710 It's a key word. 36 00:03:23,220 --> 00:03:29,640 So breaking word is used when we want to stop the execution of a program at that particular point. 37 00:03:29,850 --> 00:03:30,870 Then we use break. 38 00:03:31,080 --> 00:03:38,340 So each and every key word listed out here have it fixed meaning and they can do something. 39 00:03:38,350 --> 00:03:40,410 So that's why we use keywords. 40 00:03:40,560 --> 00:03:46,350 So these are the important keywords which we use in C++ programming language. 41 00:03:48,470 --> 00:03:51,500 Now, let's move to special characters. 42 00:03:52,760 --> 00:04:00,740 So some characters which are unprintable, but we use for some some kind of like getting some kind of 43 00:04:00,950 --> 00:04:07,910 action done, those kind of characters in C++ appoint special characters. 44 00:04:08,780 --> 00:04:18,200 Suppose we have single gods and double gods, then we have a backslash team, but then we have none. 45 00:04:18,860 --> 00:04:25,980 Then we have the new line, which is actually slash again, which means to go to any new line. 46 00:04:26,030 --> 00:04:36,170 So using this slash back slash along with this special symbol in whenever the program sees this particular 47 00:04:36,170 --> 00:04:39,500 letter, then it will move to the new line. 48 00:04:40,010 --> 00:04:44,150 So it means like output should be displayed on the new line. 49 00:04:44,630 --> 00:04:50,070 And if it is slash ad, then it will be moving to that carriage. 50 00:04:51,080 --> 00:04:58,400 Similarly, there is a slash D option in C++ that is also a special character, which we can treat as 51 00:04:58,400 --> 00:05:02,990 a special character, which will say to leave some tab space. 52 00:05:03,260 --> 00:05:04,910 So if I am putting. 53 00:05:05,950 --> 00:05:16,600 Slashed in between two letters, so I have slashed, so if I'm putting that between two letters and 54 00:05:16,600 --> 00:05:23,730 B, then whenever that slash deal good, it will leave some space that space between two characters. 55 00:05:23,740 --> 00:05:26,090 So here we have a slash d. 56 00:05:26,470 --> 00:05:33,460 So slash d means if I'm putting slash d, we do not see out of envy, then it will leave a bad space 57 00:05:33,460 --> 00:05:34,150 between envy. 58 00:05:34,150 --> 00:05:39,130 So the display of the output will be like e some space b. 59 00:05:43,800 --> 00:05:47,310 Now, the next point is all protests. 60 00:05:47,940 --> 00:05:56,370 So we have a lot of operators in C++ and each and every operator is used to doing a particular action. 61 00:05:56,410 --> 00:05:56,670 Yeah. 62 00:05:57,980 --> 00:06:04,070 So here you can see at the magic apparatus, we know at the magic of bridges, we all studied mathematics, 63 00:06:04,070 --> 00:06:04,280 right? 64 00:06:04,490 --> 00:06:13,730 So are the magic operators, a plus minus multiplication operator in case of C++, using this X will 65 00:06:13,730 --> 00:06:16,820 not work, so we will use it stat or greater. 66 00:06:17,360 --> 00:06:20,420 That will be like this standard operator. 67 00:06:21,140 --> 00:06:24,710 Then we will be using division operator. 68 00:06:25,130 --> 00:06:26,570 This is the division operator. 69 00:06:26,900 --> 00:06:28,040 Then we have more to do. 70 00:06:28,070 --> 00:06:30,020 Operator This is the smaller operator. 71 00:06:30,220 --> 00:06:33,680 Smaller operator will give you the remainder. 72 00:06:34,010 --> 00:06:36,110 Then we do some division operation. 73 00:06:36,650 --> 00:06:42,140 So to get like a remainder of a division operation, we can use the smaller operator. 74 00:06:42,350 --> 00:06:48,560 All these operators are for mathematical usage, so they are part of the medical practice. 75 00:06:49,400 --> 00:06:54,560 Now we have assignment operators, which is equal to so equal to means. 76 00:06:55,010 --> 00:06:58,970 If we want to say any value to a so that is available today. 77 00:06:59,150 --> 00:07:03,410 And if I want to put the value of equal to five, then we use equal to. 78 00:07:04,360 --> 00:07:10,480 So that is an assignment operator, then we have a comparison operator, we know that comparison means 79 00:07:10,870 --> 00:07:17,800 comparing the values so we have greater than symbol less than symbolic, greater than or equal to symbol. 80 00:07:18,860 --> 00:07:19,220 Right. 81 00:07:19,610 --> 00:07:26,330 So less than or equal in, but then we have greater than or equal blessing, but then we have equal 82 00:07:26,330 --> 00:07:32,140 to sing, then we have not the order by all these symbols that comparison opaqueness. 83 00:07:32,330 --> 00:07:36,140 So we can use this operator to compare to that. 84 00:07:36,140 --> 00:07:38,570 And so we have three and we have five. 85 00:07:38,630 --> 00:07:41,960 Oh, we can compare is less than five. 86 00:07:41,990 --> 00:07:44,360 So this is a comparison of operator. 87 00:07:45,630 --> 00:07:52,290 So we have to be able to see and be and we want to compare them then greater than be, we can use that 88 00:07:52,440 --> 00:07:56,910 comparison operator, then we have logical operators. 89 00:07:57,750 --> 00:08:01,050 So what do you mean by logical operators? 90 00:08:01,860 --> 00:08:11,130 So if we want to determine the logic between some values or variables, then we will be using this logic 91 00:08:11,130 --> 00:08:12,000 in operators. 92 00:08:12,630 --> 00:08:15,450 Then we have beat price operators. 93 00:08:15,870 --> 00:08:21,660 So these are the important operators we use in C++. 94 00:08:22,620 --> 00:08:25,910 So let's see logical operators. 95 00:08:25,980 --> 00:08:28,470 So we have mainly we have. 96 00:08:30,070 --> 00:08:32,050 And logical operator. 97 00:08:33,100 --> 00:08:35,470 All logical operator and. 98 00:08:36,610 --> 00:08:47,000 Not logical, so and logical operators to Anderson seem right, so this operator we used to compare 99 00:08:47,470 --> 00:08:52,690 check the conditions of like two conditions if two conditions are true. 100 00:08:54,150 --> 00:08:57,570 Then and will result in a true man. 101 00:08:58,140 --> 00:09:06,300 So this and oppression and on, we'd be having a detailed look in future while we are on progress so 102 00:09:06,300 --> 00:09:15,260 calmly like the basic understanding we should harvest and is used to compare two conditions. 103 00:09:15,570 --> 00:09:22,350 And if both conditions are true, then only and we return returning through any and all in this all. 104 00:09:22,530 --> 00:09:30,000 Or if like I can show you somber assessment for easiness you're greater than be. 105 00:09:32,370 --> 00:09:33,000 And. 106 00:09:34,940 --> 00:09:42,170 Yeah, Great Britain, see, this is an example for using and operator, so this condition will be true 107 00:09:42,170 --> 00:09:49,070 if we're all live in Great Britain, we and the great of Tennessee at the same time, it should be greater 108 00:09:49,070 --> 00:09:49,800 than DNA. 109 00:09:49,820 --> 00:09:56,500 Should we get rid of Nancy, then only this expression is true, which means if five is the value of 110 00:09:56,510 --> 00:09:59,960 B and BS four and CS three. 111 00:10:01,080 --> 00:10:08,610 Then this condition returns at blue value because we have used and because this condition should be 112 00:10:08,610 --> 00:10:13,770 blue and this condition should be also true, then only this will result in true value. 113 00:10:13,950 --> 00:10:18,530 If any of this condition is false, then this condition will be returning. 114 00:10:18,540 --> 00:10:25,020 If value, for example, if sees age, then the second condition is false and false. 115 00:10:25,020 --> 00:10:29,730 Condition is true, but since we have and in between, it will return false. 116 00:10:31,620 --> 00:10:31,920 Right. 117 00:10:32,250 --> 00:10:38,940 So similarly, we have all operator in case of all, operator, it's like two pipe symbols in keyboard, 118 00:10:39,810 --> 00:10:45,750 so you will be able to see dual like a straight line symbol in keyboard. 119 00:10:46,560 --> 00:10:51,300 OK, my straight line is not working well because of my pen and ink nowadays. 120 00:10:51,300 --> 00:11:00,300 But anyway, you will be c seeing it straight line in a keyboard that straight line Escada or operator. 121 00:11:00,510 --> 00:11:03,720 So we use two straight lines that scoring an operator. 122 00:11:03,930 --> 00:11:08,940 So what is the reason we use or operator is like we can check conditions. 123 00:11:09,090 --> 00:11:15,220 If both conditions are true, then our operations will result in approval. 124 00:11:15,930 --> 00:11:21,440 But in case of an operator, if any of the conditions are true, it will return it to them. 125 00:11:21,600 --> 00:11:30,930 So if a greater then B and insert a pen we are using or then if we're grateful, then see the value 126 00:11:30,930 --> 00:11:31,610 of the condition. 127 00:11:31,640 --> 00:11:34,170 This condition is actually true, but this is false. 128 00:11:34,590 --> 00:11:39,530 But still, it will return to value because we are using our operator. 129 00:11:39,600 --> 00:11:40,290 So that's it. 130 00:11:40,410 --> 00:11:42,630 What about the all operator? 131 00:11:42,690 --> 00:11:48,960 Similarly, we have big large operators, but that's not much important, so we can skip that for now.