У нас вы можете посмотреть бесплатно Conversion Specifiers in C || Lesson 11 || C Programming || Learning Monkey || или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Conversion Specifiers in C In this class, we will try to understand Conversion Specifiers in C. In our previous class, we have covered conversion specifiers like %d and %c. List of Conversion Specifiers In this class, we will cover more conversion specifiers. Using %d or %i the binary value stored on the memory is represented in the signed integer format. Ex: 10, -40, 98 etc. Using %u the binary value stored on the memory is represented in the Unsigned decimal format. Ex: 10, 40, 98 etc. Even though the binary value is a signed value it will consider it as the binary value of an unsigned decimal number. Using %c the binary value stored on the memory is represented in the Character format. Ex: a, c, & etc. Using %s the binary value stored on the memory is represented as strings. Using %e the binary value stored on the memory is represented as a floating-point number in the exponential format. Ex: 42.e3 Using %f the binary value stored on the memory is represented as a floating-point number in decimal format. Ex: 42.23, .5 etc. Using %g or %i the binary value stored on the memory is represented as a double number in decimal format or exponential format depending on the value. Formatting Information The conversion specifiers can also be provided with formatting information. Let us try to understand it by using an example. For example, consider the following lines of code. int a = 12; printf(“%d”, a); The above function will print the output as 12. Now consider the printf() function as shown below. printf(“%10d”, a); The conversion specifier is provided with formatting information. Now the output will be printed within 10 spaces including the digits. _ _ _ _ _ _ _ _ 10. Similarly, if the minus value is used with the formatting information the spaces will be allocated on the other side. printf(“%-10d”, a); 10 _ _ _ _ _ _ _ _ We can specify the formatting information for floating-point numbers also. For floating-point values, the precision can be decided. Consider the example given below. float k = 32.456789; printf(“%2.3f”, k); The precision in the output will be adjusted to three values as shown below. 32.460 Link for playlists: / @learningmonkey Link for our website: https://learningmonkey.in Follow us on Facebook @ / learningmonkey Follow us on Instagram @ / learningmonkey1 Follow us on Twitter @ / _learningmonkey Mail us @ [email protected]