0
What is the use of "char " in C programming?
6 ответов
+ 5
It is a data type to store one character of data.
+ 5
Here you are declaring an array of type character to store 20 charaters, formally known as string.
+ 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
0
But I just dont understand....ok..eg.
what is char name [20] ¿¿
0
Char c ____()