آموزش مقدماتی برنامه نویسی C | متغیرهای C

ادوکر
ادوکر
0 بار بازدید - 4 ماه پیش - در این دوره آموزشی قصد
در این دوره آموزشی قصد داریم تا شما را با اصول برنامه نویسی با زبان C اشنا کنیم. این مجموعه آموزشی یک مجموعه کامل برای آموزش زبان برنامه نویسی C است . و یک نمونه آموزشی توضیح داده شده است // variable = Allocated space in memory to store a value. // We refer to a variable's name to access the stored value. // That variable now behaves as if it was the value it contains. // BUT we need to declare what type of data we are storing. int x; //declaration x = 123; //initialization int y = 321; //declaration + initialization int age = 21; //integer float gpa = 2.05; //floating point number char grade = 'C'; //single character char name[] = "Bro"; //array of characters // % = format specifier printf("Hello %s\n", name); printf("You are %d years old\n", age); printf("Your average grade is %c\n", grade); printf("Your gpa is %f\n", gpa);
4 ماه پیش در تاریخ 1403/03/12 منتشر شده است.
0 بـار بازدید شده
... بیشتر