coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
Agar siz C tilini bilsangiz, Java, Python, C++, C# va boshqalar kabi mashhur dasturlash tillarini o'rganishda muammo bo'lmaydi, chunki sintaksis o'xshash
Git cheat sheet:

git clone — At the beginning of work.
git commit — After making changes. Remember to add a clear name for the commit.
git push origin — To save changes to a remote server.
git status — The current state of the repository.
Do not push object files or executable files to the repository! Never!
Always work in branches. Use the develop branch to do all your work.
C Variables
Variables are containers for storing data values, like numbers and characters.

In C, there are different types of variables (defined with different keywords), for example:

int - stores integers (whole numbers), without decimals, such as 123 or -123
float - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores single characters, such as 'a' or 'B'. Characters are surrounded by single quotes
int main() {
int age = 12;
int born = 23;
int birth = age + born;

printf( "%d", birth);


return 0;


}
int main() {
int birthYear = 2007;
int currentYear = 2025;
int age = currentYear - birthYear;


printf("Sizning yoshingiz: %d\n", age);

return 0;
}
int main() {


int firstNumber = 33;
printf("firstNumber = %d", firstNumber);

return 0;
}
int myNum = 15; // Integer (whole number)
float myFloatNum = 5.99; // Floating point num
ber
char myLetter = 'D'; // Charac
ter

// Print variab
les
printf("%d\n", myNu
m);
printf("%f\n", myFloatNu
m);
printf("%c\n", myLetter);
int main() {
int number1 = 33;
printf("%d\n", number1);
printf("%d", number1);

return 0;
}
coding with ☕️
int main() { int number1 = 33; printf("%d\n", number1); printf("%d", number1); return 0; }
difference between this printf("%d\n", number1);
and this printf("%d", number1);
C PROGRAMMING LANGAUGE STARTING POINT
VARIABLES
int- 123 yoki -123 kabi o'nliksiz butun sonlarni (butun sonlarni) saqlaydi
float - 19,99 yoki -19,99 kabi o'nlikli suzuvchi nuqtali raqamlarni saqlaydi
char - "a" yoki "B" kabi bitta belgilarni saqlaydi. Belgilar bitta tirnoq bilan o'ralgan
int — butun sonlar turidagi ma'lumotlar uchun.
Agar siz mavjud o'zgaruvchiga yangi qiymat tayinlasangiz, u avvalgi qiymatni qayta yozadi :

Misol

int myNum = 15; // myNum is 15
myNum = 10; // Now myNum is 10
Bundan tashqari, bir o'zgaruvchining qiymatini boshqasiga belgilashingiz mumkin:

Misol
int myNum = 15;

int myOtherNum = 23;

// Assign the value of myOtherNum (23) to myNum
myNum = myOtherNum;

// myNum is now 23, instead of 15
printf("%d", myNum);
Bir nechta o'zgaruvchilarni e'lon qilish
Bir xil turdagi bir nechta o'zgaruvchilarni e'lon qilish uchun vergul bilan ajratilgan ro'yxatdan foydalaning:

Misol
int x = 5, y = 6, z = 50;
printf("%d", x + y + z);
int main() {
int x, y, z;
x = y = z = 50;
printf("%d", x + y + z);
return 0;
}

Siz bir xil turdagi bir nechta o'zgaruvchilarga bir xil qiymatni belgilashingiz mumkin:
int main() {
// Student data
int studentID = 15;
int studentAge = 23;
float studentFee = 75.25;
char studentGrade = 'B';

// Print variables
printf("Student id: %d\n", studentID);
printf("Student age: %d\n", studentAge);
printf("Student fee: %f\n", studentFee);
printf("Student grade: %c", studentGrade);

return 0;
}
} else {
// block of code to be executed if the condition is false
}