βοΈData type
Introduction
Example: Declaring Variables of Different Data Types
#include <stdio.h>
int main() {
int age = 20;
float weight = 65.5;
char grade = 'A';
double balance = 12345.67;
printf("Age: %d\n", age);
printf("Weight: %.1f\n", weight);
printf("Grade: %c\n", grade);
printf("Balance: %.2lf\n", balance);
return 0;
}Last updated