Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request duckduckgo#3724 from lakshmanaram/C_data_types_che…
…at_sheet

new C Data Types cheat sheet
  • Loading branch information
mintsoft committed Oct 31, 2016
2 parents 58d07c8 + 27306a9 commit 3160f6a
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions share/goodie/cheat_sheets/json/cdata-types.json
@@ -0,0 +1,101 @@
{
"id": "cdata_types_cheat_sheet",
"name": "C Data Types",
"description": "Data Types available in C",

"metadata": {
"sourceName": "cppreference",
"sourceUrl" : "http://en.cppreference.com/w/c/language/arithmetic_types"
},

"aliases": [
"c data types", "c data types sizes", "c data types size", "data types in c"
],

"template_type": "terminal",

"section_order": [
"Integer Type",
"Floating Type",
"Character Type",
"Boolean Type",
"Void Type"
],

"sections": {
"Integer Type": [
{
"key":"short int",
"val":"2 Bytes, Range: -32768 to 32767"
},
{
"key":"unsigned short int",
"val":"2 Bytes, Range: 0 to 65535"
},
{
"key":"int",
"val":"The size of int is wholely dependent on the machine and compiler. For 8 bit or 16 bit machine Size: 2 Bytes, Range: -32,768 to 32,767. For 32 bit or 64 bit machine Size: 4 Bytes, Range: -2,147,483,648 to 2,147,483,647"
},
{
"key":"unsigned int",
"val":"2 Bytes, Range: 0 to 65535"
},
{
"key":"long int",
"val":"4 Bytes, Range: -2,147,483,648 to 2,147,483,647"
},
{
"key":"unsigned long int",
"val":"4 Bytes, Range: 0 to 4,294,967,295"
},
{
"key":"long long int",
"val":"8 Bytes, Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807"
},
{
"key":"unsigned long long int",
"val":"8 Bytes, Range: 0 to 18,446,744,073,709,551,615"
}
],
"Floating Type": [
{
"key":"float",
"val":"4 Bytes, Max: ±3.402,823,4x10^38, single precision floating point type"
},
{
"key":"double",
"val":"8 Bytes, Max: ±1.797,693,134,862,315,7x10^308, double precision floating point type"
},
{
"key":"long double",
"val":"8 Bytes, Max: ±1.797,693,134,862,315,7x10^308, extended precision floating point type"
}
],
"Boolean Type": [
{
"key": "bool",
"val": "type capable of holding one of the two values: 1 and 0 or the macros true or false"
}
],
"Character Type": [
{
"key": "signed char",
"val": "1 Byte, Range: -128 to 127, type for signed character representation"
},
{
"key": "unsigned char",
"val": "1 Byte, Range: 0 to 255, type for unsigned character representation"
},
{
"key": "char",
"val": "1 Byte, Range: -128 to 127, type for character representation"
}
],
"Void Type": [
{
"key": "void",
"val": "type for the result of a function that returns normally, but does not provide a result value to its caller"
}
]
}
}

0 comments on commit 3160f6a

Please sign in to comment.