DEV Community

Charos1mm
Charos1mm

Posted on • Updated on

CHAR HAQIDA MA'LUMOT

`

Char bugungi mavzuyimiza, oz ichiga faqatgina 1ta belgini oladi.

Misol uchun:

`cpp
int main1() {
int a = 10;
float b = 10.5;
double c = 10.232153515136;
string d ="ikkichilar";

// char => character(belgi);

char belgi = 65;
int son = 'A';
// int son = 3;

cout << belgi << " " <<son;
return 0;
}
`

_Charda faqatgina 1ta dona belgini saqlashimiza mumkun.Undan kopni saqlay olmaymiz.Charni intga ,intni esa charga ozgartiramiza.
_

Misol uchun:

`cpp

include

include

using namespace std;
int main3(){
int a =65;
char b ='z';
cout << char (a);
cout << endl << int (b);
return 0;
}
`
Chardan A va a belgilarni qanday qilib chiqarishni organib oldik.

Misol uchun:

`cpp

include

include

using namespace std;

int main (){
char a;
cin >> a;
cout << char (a+32);

return 0;
}
`
BUGUNGI DARSIMIZA CHAR HAQIDA BOLDI.

@dawroun

Top comments (0)