Home›Learn›C›C Data Types
C PROGRAMMING MASTER COURSEBEGINNER FRIENDLY

C Data Types

Learn C Data Types with simple explanations, practical examples, coding practice, MCQs and interview preparation.

📖 Chapter 4 / 22⏱️ 8–10 Min Read🎯 Beginner Friendly
Course Progress18%
📘

Theory

Understand the concept step by step

C Data Types

Data types define what kind of value a variable can store.

Common Data Types

Data TypeExample
int10
float10.5
double25.678
char'A'

Integer

int number = 100;

Floating Point

float price = 99.50;

Character

char grade = 'A';

Choosing the appropriate data type helps represent data correctly.

💻

Example

Try this C program yourself

Python
#include <stdio.h>

int main() {
    int number = 10;
    float price = 99.50;
    double value = 25.678;
    char grade = 'A';

    printf("%d\n", number);
    printf("%.2f\n", price);
    printf("%.3lf\n", value);
    printf("%c", grade);

    return 0;
}
📤

Output

Expected result of the program

Output
10
99.50
25.678
A
📝

Practice

Test your understanding

💡

Try it yourself

Don't just read the example. Open your C editor and write the program yourself. Try changing the values and observe what happens.

PRACTICE 01

Modify the example program and experiment with different values.

PRACTICE 02

Write the same program from scratch without looking at the example.

❓

Quick Quiz

Test what you learned

Question 1 of 5Score: 0

What type of language is C?

💼

Interview Questions

Prepare for your C programming interview

1

Interview Question

What is C programming language?

+

Answer

C is a general-purpose programming language widely used for system programming, embedded systems, operating systems and application development.

2

Interview Question

Why is C still important?

+

Answer

C provides efficient low-level memory access and is widely used in systems programming, embedded systems and performance-critical software.

3

Interview Question

What is the purpose of main() in C?

+

Answer

The main() function is the designated entry point of a hosted C program. Program execution begins by calling main().

Chapter 4 of 22

Keep going — you're doing great! 🚀

18%