0

What is the use of "char " in C programming?

3rd Nov 2020, 3:52 AM
äňøñýmøü§_đëvīľ_666
äňøñýmøü§_đëvīľ_666 - avatar
6 ответов
+ 5
It is a data type to store one character of data.
3rd Nov 2020, 3:57 AM
Arsenic
Arsenic - avatar
+ 5
Here you are declaring an array of type character to store 20 charaters, formally known as string.
3rd Nov 2020, 4:00 AM
Arsenic
Arsenic - avatar
+ 1
As you may know machines work with binary numbers i.e. numbers made of 0 and 1 only. Just to explain the logic, imagine you want to store information into a three digit binary number. You can store 8 different information: 000 001 010 011 100 101 110 111 now with the type "int" you tell to the machine that 00 is 0, 010 is 2 and so on. with the type "char" you tell that 000 is 'a', 010 is 'c' and so on
3rd Nov 2020, 12:58 PM
Davide
Davide - avatar
0
But I just dont understand....ok..eg. what is char name [20] ¿¿
3rd Nov 2020, 3:59 AM
äňøñýmøü§_đëvīľ_666
äňøñýmøü§_đëvīľ_666 - avatar
0
Char c ____()
23rd Jun 2023, 12:29 PM
Kaveri Baireddy
Kaveri Baireddy - avatar