DEV Community

Cover image for Variables
umida5
umida5

Posted on

Variables

                        Rules 
Enter fullscreen mode Exit fullscreen mode

int son; Declaration - e'lon qilish
son = 11; Assignment - qiymat o'zgartirish

int raqam = 15; Intialization - e'lon qilib srazu qiymat berish

int a,b,c,d,e; Bir xil tipdagi o'zgaruvchilarni 1 qatorda e'lon qilish mumkin emas.

int raqam = 5; O'zgaruvchiga 1 xil nom berish mumkin emas.

float harorat, int x = 1; 1 qatorda 1 nechta o'zgaruvchi ishlatib bo'lmaydi

                 Nomlash qoidalari
Enter fullscreen mode Exit fullscreen mode


1.Nomda alifbo harflari,raqamlar va undercore ishlatish mumkin
2.Nomning 1 chi belgisi raqam bo'la olmaydi
3.Nomda maxsus belgilar bo'lishi mumkin emas
4.Maxsus kalit so'zlardan nom sifatida foylalana olmaymiz

Casting rules
Katta harf va kichik harf b-n ishlash
Local o'zgaruvchilar cameLcase orqali yoziladi.
Propertylar,metod nomlari,class nomlari PascalCase orqali
yoziladi.
Constant qiymatga ega o'zgaruchilar UPPERCASE orqali yoziladi.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

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

Okay