1 00:00:01,410 --> 00:00:02,040 Hello. 2 00:00:02,040 --> 00:00:09,990 In this lecture you will learn about the character types, the character types here, the store, human 3 00:00:09,990 --> 00:00:11,370 language data. 4 00:00:12,090 --> 00:00:14,580 There are six character types. 5 00:00:15,210 --> 00:00:22,680 The six are car, car, character, 16 T character and 32 T sine car. 6 00:00:22,950 --> 00:00:24,150 Unsigned character. 7 00:00:24,150 --> 00:00:25,080 We. 8 00:00:25,380 --> 00:00:26,490 Character T. 9 00:00:26,640 --> 00:00:30,030 So the character type is a default type. 10 00:00:30,300 --> 00:00:33,690 It has it always has. 11 00:00:33,690 --> 00:00:37,820 A one byte could be signed or unsigned. 12 00:00:37,830 --> 00:00:42,840 For example, this character type uses in ASCII system. 13 00:00:43,440 --> 00:00:45,990 Here we have character 16 T. 14 00:00:46,530 --> 00:00:57,150 This is the use for for two byte character sets, example UTF 16 and character 32 byte here used for 15 00:00:57,150 --> 00:00:59,190 the four byte. 16 00:00:59,460 --> 00:01:04,290 Sorry for this mistake used for four byte character sets. 17 00:01:04,290 --> 00:01:13,390 For example, this character type used on UTF two or UTF 32 character system. 18 00:01:13,390 --> 00:01:22,570 So the sign character same as character, but guaranteed to be signed, unsigned character as same as 19 00:01:22,570 --> 00:01:25,450 character, but guaranteed to be unsigned. 20 00:01:25,450 --> 00:01:33,910 And lastly, we character T has a large enough to contain the largest character of the implementations 21 00:01:33,910 --> 00:01:37,450 local which called Unicode. 22 00:01:38,080 --> 00:01:42,250 So we have two types of characters, mainly two groups of characters. 23 00:01:42,370 --> 00:01:45,400 These are the narrow characters and white characters. 24 00:01:45,430 --> 00:01:52,180 Narrow characters include characters, signed character, unsigned character, and the white characters 25 00:01:52,180 --> 00:02:04,960 includes car 16, T, car 32, T and W character T Here the the characters types here. 26 00:02:04,960 --> 00:02:16,900 As you can see here, all of that is character types and this is these are the for the types that store 27 00:02:16,900 --> 00:02:23,680 human language data for example A, B, C, D or like that. 28 00:02:24,070 --> 00:02:27,880 So we let's go to character literals. 29 00:02:27,880 --> 00:02:37,450 We will use here A character letter is a single constant character here, single quotation mark like 30 00:02:37,450 --> 00:02:38,020 this. 31 00:02:38,170 --> 00:02:46,060 So all characters, if the character is any type but character car, you must also provide a prefix 32 00:02:46,060 --> 00:03:03,250 for L for car u for car 16 T and and uppercase U for character 32 T So let me actually add this here. 33 00:03:03,880 --> 00:03:04,210 Um. 34 00:03:06,050 --> 00:03:06,710 Literal. 35 00:03:07,040 --> 00:03:13,970 Literal is character to literal is uppercase u. 36 00:03:13,970 --> 00:03:20,810 As I said, character 16 T is under case. 37 00:03:21,290 --> 00:03:23,390 Literal is just u. 38 00:03:24,510 --> 00:03:28,800 But not uppercase and the usual character. 39 00:03:30,310 --> 00:03:33,740 Has, for example, the has. 40 00:03:33,950 --> 00:03:34,280 L. 41 00:03:44,120 --> 00:03:45,530 Here, as you can see here. 42 00:03:46,850 --> 00:03:52,430 But for the default character, you just use the two quotation marks. 43 00:03:52,430 --> 00:03:56,000 And between this or be here. 44 00:03:56,000 --> 00:03:58,190 You here. 45 00:03:59,880 --> 00:04:04,620 So we have the escape sequences for characters as well. 46 00:04:06,640 --> 00:04:08,680 The escape sequence. 47 00:04:08,920 --> 00:04:11,260 Some characters don't display on the screen. 48 00:04:11,260 --> 00:04:19,240 Instead, they force the display to do things like move the cursor to the left side of the screen carriage, 49 00:04:19,240 --> 00:04:23,560 return or move the cursor down one line. 50 00:04:23,590 --> 00:04:27,910 The new line here so other characters can display on the screen. 51 00:04:27,910 --> 00:04:34,300 But they are part of the cplusplus language syntax, such as simple or double quotes you, so you must 52 00:04:34,300 --> 00:04:35,560 use them very carefully. 53 00:04:35,560 --> 00:04:41,620 But these characters into car, you use the escape sequences. 54 00:04:41,620 --> 00:04:46,690 So let's, let's create a list of the escape sequences here in this lecture. 55 00:04:47,020 --> 00:04:50,380 The first escape sequences here. 56 00:04:50,750 --> 00:04:53,440 Escape sequences. 57 00:04:56,310 --> 00:04:57,500 New line is. 58 00:04:57,510 --> 00:04:58,950 New line is. 59 00:05:00,180 --> 00:05:00,810 An. 60 00:05:03,140 --> 00:05:06,070 Uh, the top here is. 61 00:05:08,330 --> 00:05:08,870 He. 62 00:05:12,120 --> 00:05:12,660 Here. 63 00:05:13,620 --> 00:05:17,320 Tab vertical is V. 64 00:05:21,820 --> 00:05:23,830 The backspace. 65 00:05:25,640 --> 00:05:28,760 Back space is be. 66 00:05:30,050 --> 00:05:30,600 Of ski. 67 00:05:32,180 --> 00:05:34,100 The carriage. 68 00:05:35,040 --> 00:05:35,970 Return of. 69 00:05:39,730 --> 00:05:40,120 P. 70 00:05:41,870 --> 00:05:43,220 The carriage return. 71 00:05:44,670 --> 00:05:47,250 Is re are. 72 00:05:49,910 --> 00:05:51,230 For form fit. 73 00:05:51,260 --> 00:05:54,580 Form fit is f. 74 00:05:57,140 --> 00:06:01,080 The alert alert is E. 75 00:06:03,580 --> 00:06:04,720 The backslash. 76 00:06:09,680 --> 00:06:11,900 Is double here. 77 00:06:12,170 --> 00:06:14,270 Double X character. 78 00:06:14,630 --> 00:06:19,310 The single quote is this. 79 00:06:19,940 --> 00:06:21,140 And double quote. 80 00:06:23,780 --> 00:06:27,590 Is this double quote just a normal double quote. 81 00:06:30,060 --> 00:06:33,210 And the null character here, the null. 82 00:06:34,870 --> 00:06:38,110 Car is zero backslash. 83 00:06:38,110 --> 00:06:38,770 Zero. 84 00:06:39,770 --> 00:06:42,860 So we have a Unicode escape characters as well. 85 00:06:42,860 --> 00:06:49,070 So you can specify Unicode character, Unicode characters, literals using the universal character names 86 00:06:50,210 --> 00:06:58,700 and you can form a universal character name in one of the two ways the prefix you here you. 87 00:07:00,100 --> 00:07:12,880 Uh, followed by the four digit of Unicode point here or the prefix uppercase U followed by an eight 88 00:07:12,880 --> 00:07:15,550 digit Unicode code point. 89 00:07:15,550 --> 00:07:19,570 So you can represent a E character here. 90 00:07:21,190 --> 00:07:25,510 E character is here. 91 00:07:29,780 --> 00:07:33,980 A lowercase u and four digit. 92 00:07:34,520 --> 00:07:34,870 So. 93 00:07:34,910 --> 00:07:37,070 So a character is this. 94 00:07:39,060 --> 00:07:50,310 So actually you can learn this character on um the so there's a list for this character Unicode characters 95 00:07:50,310 --> 00:07:55,620 here you need Unicode characters. 96 00:07:56,860 --> 00:07:57,280 Here. 97 00:08:03,420 --> 00:08:05,310 Uh, table. 98 00:08:25,760 --> 00:08:36,830 Here I found this website which is almost all Unicode characters and their, um, their Unicode point 99 00:08:36,830 --> 00:08:41,040 character and UTF eight points here. 100 00:08:41,060 --> 00:08:46,580 So as you can see here, if you want to write an A to console. 101 00:08:47,770 --> 00:09:00,320 Uh, you can just use this with single quotes followed by the backslash U and after that you enter the 102 00:09:00,320 --> 00:09:02,290 code of this characters. 103 00:09:03,180 --> 00:09:11,340 So as you can see, you can use the other symbols and characters here with different numbers. 104 00:09:13,460 --> 00:09:13,940 Here. 105 00:09:15,690 --> 00:09:18,120 So I will copy this website. 106 00:09:20,250 --> 00:09:26,970 Uh, on the lectures download here, which you can see it here. 107 00:09:27,120 --> 00:09:28,200 So. 108 00:09:29,990 --> 00:09:32,410 Let's begin with an example. 109 00:09:32,420 --> 00:09:34,010 Enough for the terrorists here. 110 00:09:34,010 --> 00:09:35,870 Let's get to practical. 111 00:09:35,870 --> 00:09:39,530 So let's create our code here. 112 00:09:41,180 --> 00:09:47,770 Let's create some character named X and give this M and let's create another character. 113 00:09:47,780 --> 00:09:48,980 Double character. 114 00:09:50,270 --> 00:09:53,560 He called ye here. 115 00:09:53,940 --> 00:09:59,390 Why the big uppercase L and Z here? 116 00:10:03,420 --> 00:10:05,790 And then print f. 117 00:10:08,960 --> 00:10:23,000 Windows binaries start with C and C again and new line and gave this format specifiers as first our 118 00:10:23,000 --> 00:10:24,140 x and y. 119 00:10:25,270 --> 00:10:25,660 Here. 120 00:10:29,910 --> 00:10:34,740 Uh, I thought we did hear something or see. 121 00:10:34,770 --> 00:10:35,430 No. 122 00:10:35,580 --> 00:10:39,600 So we gave this X and Y. 123 00:10:41,990 --> 00:10:42,640 Yeah. 124 00:10:42,650 --> 00:10:43,400 Sorry. 125 00:10:47,990 --> 00:10:51,080 Well, let's compile this code now. 126 00:10:52,490 --> 00:10:52,790 Oops. 127 00:10:58,050 --> 00:10:58,500 Run. 128 00:11:03,680 --> 00:11:08,930 Here a Windows binaries start with M. 129 00:11:09,990 --> 00:11:10,520 And Z. 130 00:11:11,100 --> 00:11:14,690 This program outputs this year. 131 00:11:15,840 --> 00:11:27,270 As you can see here, even though the M is a narrow character car and then the Z is here is a wide character. 132 00:11:27,940 --> 00:11:35,620 Printf works because the program uses the correct format specifiers. 133 00:11:35,800 --> 00:11:42,070 The next lecture will be about the boolean types, so I'm waiting you in the next lecture.