xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to create different data types in C
C Online Editor
Execute Code
More C Sample Codes
#include <stdio.h> int main() { //Examples of different data types in C printf("Examples of different data types in C:\n"); char charVariable = 'A'; // Character data printf("%c is a character data\n", charVariable); // \n is used to create newline const char* stringVariable = "Hello C"; // String data printf("%s is a string data\n", stringVariable); int integerVariable = 10; // Integer data printf("%d is an integer data\n", integerVariable); float floatVariable = 3.14f; // Float data printf("%f is a float data\n", floatVariable); double doubleVariable = 123.45; // Double data printf("%lf is a double data\n", doubleVariable); int boolVariable = 1; // Boolean data (0 represents false, non-zero represents true) printf("%s is a boolean data", boolVariable ? "True" : "False"); return 0; }