DEV Community

Oromiddin
Oromiddin

Posted on

1 1 1 1 1

Variables -> O'zgaruvchilar

                integer[int]:
Enter fullscreen mode Exit fullscreen mode

Butun sonlar uchun qollaniladi.

                        long:
Enter fullscreen mode Exit fullscreen mode

Butun sonlar uchun qollaniladi , va hotirani kuchaytirib beradi.

                       short:
Enter fullscreen mode Exit fullscreen mode

Butun sonlar uchun qollaniladi.

                      double:
Enter fullscreen mode Exit fullscreen mode

Kasr sonlar uchun qollaniladi.

                       float:
Enter fullscreen mode Exit fullscreen mode

Kasr sonlar uchun ishlatiladi.

                      string:
Enter fullscreen mode Exit fullscreen mode

Matn va tekstlar uchun qollaniladi.
char:
Belgilar uchun qollaniladi.

                  Data types:
Enter fullscreen mode Exit fullscreen mode

int = 4 bytes.
float = 4 bytes.
double = 8 bytes.
string = 32 bytes.
char = 1 byte.

                    Examples:
Enter fullscreen mode Exit fullscreen mode

int son;// Declaration [ozgarvuchini elon qilish]
son = 10;// Assigment [ozgaruvchiga qiymat berish]
int raqam = 10; // Intialization
[E'lon qilib qiymat berish]
int a, b, c, d; // Bir hil tip da bolgan bir nechta ozgaruvchi elon qilish mumkin.

                      Errors:
Enter fullscreen mode Exit fullscreen mode

int raqam = 10;
int raqam = 15;
Bir hil ozgaruvchini nomini qayta ishlatish mumkin emas.

float KasrSon=12.3;int num=10; Bir qatorda xar xil ozgarvuchilarni elon qilish mumkinmas.

int Simple Num; ozgaruvchi nomini ortasida space qoyish mumkin emas.
int #qwerty; maxsus belgilardan foydalanish mumkin emas.
int 1num; birinchi belgi raqam bolish mumkin emas.
int while; kalit sozlarni ishlatish mumkin emas.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
sunnat_qayumov profile image
Sunnat Qayumov

yorvoribsiz

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay