DEV Community

Muhammadyusuf Xotamov
Muhammadyusuf Xotamov

Posted on

2 1 1 1 1

O'zgaruvchilar

Assalomu alekum bugun biz ozgaruvchilar bilan tanishamiz

O'zgaruvchilar - xotiraning nomlangan qismi bo'lib, o'zida ma'lum bir toifadagi qiymatlarni saqlaydi. O'zgaruvchining nomi va qiymatlari bo'ladi. O'zgaruvchining nomi orqali qiymat saqlanayotgan xotira qismiga murojaat qilinadi. Programma ishlashi jarayonida o'zgaruvchining qiymatini o'zgartirish mumkin. Har qanday o'zgaruvchini ishlatishdan oldin, uni e'lon qilish lozim.

  1. int butun sonlarni saqlaydi masalan 123 va 1234

  2. double kasr o'nli sonlani saqlaydi 34.2

3.float ham kasr sonlarni saqlaydi leki farqi katta 23.2

4.char belgilarni saqlaydi

5.string matnlarni chop etadi

  1. bool qiymatlarni to'g'ri noto'riligini etad "True" va "False"
#include <iostream>

using namespace std;

int main()
{

int number = 1;

cout << number << endl;

return 0;
}
Enter fullscreen mode Exit fullscreen mode

int ga qiymat berdik qiymat berishni bilmasangiz linkka [kiringhttps://dev.to/muhammadyusuf_xotamo/ozgaruvchiga-nom-berish-va-qiymat-berish-4hl5

#include <iostream>

using namespace std;

int main()
{

string a = Mahamadjon;

cout << string << endl;

return 0;
}
Enter fullscreen mode Exit fullscreen mode

string ga ism saqladik tushunmasangiz Mahamadjon tushuntirib beradi

#include <iostream>

using namespace std;

int main()
{

float a = 20.12;

cout << a << endl;// float faqat kasr sonlarga ishlatiladi

return 0;
}
Enter fullscreen mode Exit fullscreen mode
#include <iostream>

using namespace std;

int main()
{

char z = 'Z';

cout << z << endl;

return 0;
}
Enter fullscreen mode Exit fullscreen mode
#include <iostream>

using namespace std;

int main()
{

bool a = true;

cout << a << endl;// bool true yoki false (1;0)

return 0;
}
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

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

Okay