0% found this document useful (0 votes)
13 views3 pages

C Keywords

The document provides a list of useful C keywords along with their descriptions. Each keyword serves a specific purpose in programming, such as controlling loops, defining data types, and managing conditional statements. The keywords include 'break', 'case', 'char', 'const', 'if', 'for', and others, each with a brief explanation of its function.

Uploaded by

Lê Hồng Minh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

C Keywords

The document provides a list of useful C keywords along with their descriptions. Each keyword serves a specific purpose in programming, such as controlling loops, defining data types, and managing conditional statements. The keywords include 'break', 'case', 'char', 'const', 'if', 'for', and others, each with a brief explanation of its function.

Uploaded by

Lê Hồng Minh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

C Keywords

A list of useful C keywords can be found in the table below.


Keyword Description

break Breaks out of a loop or a switch block

case Marks a block of code in switch statements

char A data type that can store a single character

const Defines a variable or parameter as a constant (unchangeable)

continue Continues to the next iteration of a loop

default Specifies the default block of code in a switch statement

do Used together with while to create a do/while loop

double A data type that is usually 64 bits long which can store fractional
numbers

else Used in conditional statements

enum Declares an enumerated type

float A data type that is usually 32 bits long which can store fractional
numbers

for Creates a for loop

goto Jumps to a line of code specified by a label

if Makes a conditional statement

int A data type that is usually 32 bits long which can store whole
numbers

long Ensures that an integer is at least 32 bits long (use long long to
ensure 64 bits)

return Used to return a value from a function

short Reduces the size of an integer to 16 bits

signed Specifies that an int or char can represent both positive and
negative values (for int this is the default so the keyword is not
usually necessary)

sizeof An operator that returns the amount of memory occupied by a


variable or data type
static Specifies that a variable in a function keeps its value after the
function ends

struct Defines a structure

switch Selects one of many code blocks to be executed

typedef Defines a custom data type

unsigned Specifies that an int or char should only represent positive


values which allows for storing numbers up to twice as large

void Indicates a function that does not return a value or specifies a


pointer to a data with an unspecified type

while Creates a while loop

You might also like