Operators precedence Precedence of Expressions in C Conversions Usual Arithmetic Conversions . Structure Member Operator -> Indirect Structure Field Reference Operator ++ Increment Operator (prefix and postfix) -- Decrement Operator (prefix and postfix) sizeof Size of Variable or Type (unary) ~ Bitwise NOT operator (unary) ! Logical NOT operator (unary) & Address (unary); Bitwise AND (binary) * Indirection (unary); Multiplication (binary) / Division operator + Identity (unary); Addition (binary) - Negation (unary); Subtraction (binary) << Bitwise Shift Left >> Bitwise Shift Right == Equality operator != Inequality operator (Not Equal) < Less Than operator > Greater Than operator <= Less than or Equal to operator >= Greater Than or Equal To ^ Bitwise Exclusive OR operator (XOR) | Bitwise OR operator && Logical AND operator || Logical OR operator ? : Conditional operator (ternary) = Assignment operator op= Compound Assignment operator , Expression evaluation % Modulus operator Data types: auto Automatic Data Storage Class cdecl External Name Modifier char Character Data Type Classes Data and Function Storage Classes const Constant Data Type Modifier Constants C Language Constants double Double-Precision Floating-Point Data Type enum Enumeration Data Type extern External Data Storage Class far far - Non-Standard Type Modifier float Single-Precision Floating-Point Data Type huge huge-on-Standard Type Modifier int Integer Data Type long Long Integer Data Type near near - Non-Standard Type Modifier pascal Pascal Calling Sequence Modifier register Register Data Storage Class short Short Integer Data Type signed Signed Integral Data Type static Static Data Storage Class struct Structure Data Type Type Modifiers Keywords That Modify Data Types typedef Derived Data Type Specifier Types Data and Function Return Types union Union Data Type unsigned Unsigned Integral Data Type void The Void Function Return Type volatile Volatile Data Type Modifier Statements: break break Statement case case Statement continue continue Statement default Default Case in a Switch Statement do do-while Statement else else Clause of an if for for Statement goto goto Statement if if Statement label Label (target of a goto) return return Statement switch switch Statement while while Statement Functions abort() Abort Process and Return Error abs() Calculate Absolute Value of Integer absread() Read Disk Sectors abswrite() Write Disk Sectors access() Check File Permission Setting acos() Calculate Arc Cosine alloca() Allocate Memory Block on Stack allocmem() Allocate DOS Memory Segment asctime() Convert Time from Structure to String asin() Calculate Arc Sine assert() Diagnostic Message Generator atan() Calculate Arc Tangent atan2() Calculate Arc Tangent of y/x atexit() Register Exit Function atof() Convert String to Double atoi() Convert String to Integer atol() Convert String to Long bdos() Invoke DOS Function, Short Form bdosptr() MS-DOS System Call bioscom() Communications I/O biosdisk() Hard Disk / Floppy I/O biosequip() Check Equipment bioskey() Keyboard Interface biosmemory() Return Memory Size biosprint() Printer I/O biostime() Return the Time of Day brk() Change Data-Segment Space Allocation bsearch() Perform Binary Search cabs() Calculate Absolute Value of Complex Number calloc() Allocate and Zero Memory ceil() Calculate Ceiling of Value cgets() Get a Character String from the Console chdir() Change Current Working Directory chmod() Change File Permission Setting _chmod() Change Access Mode of File _clear87() Get and Clear 8087/80287 Status Word clearerr() Clear Error Indicator for a Stream close() Close File _close() Close a File Handle coreleft() Return a Measure of Unused Memory cos() Calculate Cosine cosh() Calculate Hyperbolic Cosine country() Return Country-Dependent Information cprintf() Formatted Write to Console cputs() Write a String to the Console creat() Create a New File _creat() Create a New File creatnew() Create a New File creattemp() Create a New File or Rewrite an Existing One cscanf() Read Formatted Data from Console ctime() Convert Time from Long Integer to String ctrlbrk() Set Control-Break Handler difftime() Find the Difference between Two Times disable() Disable Interrupts dosexterr() Get DOS Extended Error Values dostounix() Convert Date and Time to UNIX Time Format dup() Create Second Handle for Open File dup2() Reassign a File Handle ecvt() Convert Double to String enable() Enable Interrupts eof() Test for End of File exec...() An Overview of the Eight Exec Functions execl() Execute Program Using: Arg List execle() Execute Program Using: Arg List, Environment execlp() Execute Program Using: Arg List, PATH execlpe() Execute Program Using: Arg List, PATH, Environment execv() Execute Program Using: Arg Array execve() Execute Program Using: Arg Array, Environment execvp() Execute Program Using: Arg Array, PATH execvpe() Execute Program Using: Arg Array, PATH, Environment exit() Terminate Process after Cleanup _exit() Terminate Process without Cleanup exp() Calculate Exponential fabs() Calculate Absolute Value of Floating point farcalloc() Allocate Memory from Far Heap farcoreleft() Return Measure of Unused Memory in Far Heap farfree() Free a Block from Far Heap farmalloc() Allocate Memory from Far Heap farrealloc() Adjust Allocated Block in Far Heap fclose() Close a Stream fcloseall() Close All Open Streams fcvt() Convert Double to String fdopen() Open a Stream Using a Handle feof() Detect Stream End-of-File (Macro) ferror() Test for Error on a Stream (Macro) fflush() Flush a Stream fgetc() Read a Character from a Stream fgetchar() Read a Character from Stdin fgets() Read a String from Stream filelength() Return File Length fileno() Get File Handle Associated with Stream (Macro) findfirst() Search Disk Directory findnext() Fetch Files That Match findfirst() floor() Calculate Floor of Value flushall() Flush All Streams and Clear All Buffers fmod() Calculate Floating point Remainder fnmerge() Make New File Name fnsplit() Split a Full Path Name into Its Components fopen() Open a File FP_OFF() Get or Set Offset Portion of a Far Pointer (Macro) FP_SEG() Get or Set Segment Portion of a Far Pointer (Macro) _fpreset() Reinitialize Floating-Point Math Package fprintf() Write Formatted Data to Stream fputc() Write a Character to a Stream fputs() Write a String to Stream fread() Read Unformatted Data from Stream free() Deallocate Memory Block freemem() Free a Previously Allocated DOS Memory Block freopen() Reassign a File Pointer frexp() Get Mantissa and Exponent of Floating-Point Value fscanf() Read Formatted Data from Screen fseek() Reposition File Pointer to Given Location fstat() Get Information about Open File ftell() Get Current File Pointer Position fwrite() Write Unformatted Data to Stream gcvt() Convert Double to String geninterrupt() Generate Software Interrupt getc() Read a Character from a Stream (Macro) getchar() Read a Character from 'Stdin' getch() Get a Character from the Console without Echo getche() Get a Character from Console with Echo getcwd() Get Path Name of Current Working Directory getenv() Get a Value from the Environment Table getpid() Get Process ID getcbrk() Get Control-Break Setting getcurdir() Get Current Directory getdate() Get Date getdfree() Get Disk Free Space getdisk() Get Current Drive getdta() Get Disk Transfer Address getfat() Get File Allocation Table Information getfatd() Get File Allocation Table Information getftime() Get File Date and Time getpass() Read a Password getpsp() Get the Program Segment Prefix gets() Read a Line from 'Stdin' gettime() Get System Time getvect() Get Interrupt Vector Entry getverify() Get Verify State getw() Read an Integer from a Stream gmtime() Convert Time from Long Integer to Structure gsignal() Software Signals harderr() Establish a Hardware Error Handler hardresume() Hardware Error Handler Function hardretn() Hardware Error Handler Function hypot() Calculate the Hypotenuse of a Right Triangle inport() Input from Hardware Port inportb() Input from Hardware Port intr() Alternate 8086 Software Interrupt Interface int86() Execute 8086 Software Interrupt int86x() Set Segment Registers and Execute Software Interrupt intdos() Invoke DOS Function, Long Form intdosx() Set Seg Regs and Invoke DOS Function, Long Form ioctl() Control I/O Device isalnum() Test for Alphanumeric Character (Macro) isalpha() Test for Alphabetic Character (Macro) isascii() Test for ASCII Character (Macro) isatty() Check for Character Device iscntrl() Test for Control Character isdigit() Test for Digit isgraph() Test for Printable Character Except Space islower() Test for Lowercase isprint() Test for Printable Character ispunct() Test for Punctuation Character isspace() Test for White-Space Character isupper() Test for Uppercase isxdigit() Test for Hexadecimal Digit itoa() Convert Integer to String kbhit() Check Keyboard Input Buffer for Character Waiting keep() Exit and Remain Resident labs() Calculate Absolute Value of Long Integer ldexp() Convert Mantissa and Exponent to Floating Point lfind() Linear Search for Key localtime() Convert Time from Int to Structure-Local Correction lock() Set File Sharing Locks log() Calculate Natural Logarithm log10() Calculate Base 10 Logarithm longjmp() Restore Program State lsearch() Linear Search for Key; Add Key If Not Found lseek() Reposition File Pointer to Specified Location ltoa() Convert Long to String malloc() Allocate Memory Block matherr() Handle Math Error _matherr() Floating-Point Error Handling Routine memccpy() Copy Characters from Buffer memchr() Find Character in Buffer memcmp() Compare Characters from Two Buffers memcpy() Copy Characters between Buffers memicmp() Compare Characters in Two Buffers memmove() Move a Block of Bytes memset() Initialize Buffer mkdir() Create a New Directory MK_FP() Make a Far Pointer mktemp() Create a Unique File Name modf() Split Floating Point into Mantissa and Exponent movedata() Copy Characters to a Different Segment movmem() Move a Block of Bytes open() Open a File _open() Open a File For Reading or Writing outport() Output to a Hardware Port outportb() Output to a Hardware Port parsfnm() Parse File Name peek() Examine Memory Location peekb() Examine Memory Location perror() Print Error Message poke() Store Value at a Given Memory Location pokeb() Store Value at a Given Memory Location poly() Generate a Polynomial from Arguments pow() Calculate X Raised to the Yth Power pow10() Power Function printf() Write Formatted String to Stdout putc() Write a Character to Stream putchar() Write a Character to Stdout putch() Write a Character to the Console putenv() Create New Environment Variables puts() Write String to Stdout putw() Write an Integer to Stream qsort() Perform Quick Sort rand() Get Pseudorandom Integer randbrd() Random Block Read randbwr() Random Block Write read() Read Data from File _read() Read Data from a File realloc() Reallocate Memory Block rename() Rename a File or Directory rewind() Reposition File Pointer to Beginning of Stream rmdir() Remove a Directory sbrk() Reset Break Value for Calling Process scanf() Read Formatted Data from Stdin searchpath() Search the DOS Path segread() Return Current Values of Segment Registers setblock() Modify Size of DOS Memory Segment setbuf() Control Stream Buffering setcbrk() Set Control-Break Setting setdate() Set MS-DOS Date setdisk() Set Current Disk Drive setdta() Set Disk Transfer Address setftime() Set File Date and Time setjmp() Save Program State setmem() Assign a Value to Memory setmode() Set File Translation Mode settime() Set System Time setvbuf() Control Stream Buffering and Buffer Size setvect() Set Interrupt Vector Entry setverify() Set Verify State sin() Calculate Sine sinh() Calculate Hyperbolic Sine sleep() Suspend Execution for Interval spawn...() An Overview of the Eight Spawn Functions spawnl() Execute Program Using: Arg List spawnle() Execute Program Using: Arg List, Environment spawnlp() Execute Program Using Arg List, PATH spawnlpe() Execute Program Using Arg List, PATH, Environment spawnv() Execute Program Using Arg Array spawnve() Execute Program Using Arg Array, Environment spawnvp() Execute Program Using Arg Array, PATH spawnvpe() Execute Program Using Arg Array, PATH, Environment sprintf() Write Formatted Data to String sqrt() Calculate Square Root srand() Set Random Starting Point sscanf() Read Formatted Data from String ssignal() Implement Software Signals stackavail() Return Size of Available Stack Memory stat() Get File Status Information on Named File _status87() Get 8087/80287 Floating point Status Word stime() Set Time strcat() Append a String strchr() Find a Character in a String strcmp() Compare Two Strings, Case Sensitive strcmpi() Compare Two Strings, Case Insensitive stricmp() Compare Two Strings, Case Insensitive strcpy() Copy One String to Another strcspn() Scan One String for Another strdup() Duplicate String strerror() Save System Error Message strlen() Get String Length strlwr() Convert String to Lower Case strncat() Append Specified Number of Characters to a String strncmp() Compare n Characters of Two Strings, Case Sensitive strnicmp() Compare n Characters of Strings, Case Insensitive strncpy() Copy a Specified Number of Characters strnset() Initialize n Characters of String strpbrk() Scan String for Character from Character Set strrchr() Scan String for Last Occurrence of Character strrev() Reverse Characters in String strset() Set All Characters in String strspn() Find First Substring strstr() Find Substring strtod() Convert String to Double strtol() Convert String to Long Decimal Integer strtok() Finds Next Token in String strupr() Convert String to Uppercase swab() Swap Bytes system() Execute DOS Command tan() Calculate Tangent tanh() Calculate Hyperbolic Tangent tell() Get Current File Pointer Position time() Get Current System Time as Long Integer toascii() Convert 'c' to ASCII Character tolower() Convert 'c' To Lowercase, If Appropriate _tolower() Convert 'c' to Lowercase toupper() Convert 'c' to Uppercase, If Appropriate _toupper() Convert 'c' to Uppercase tzset() Set External Time Variables, Environment Variables ultoa() Convert Unsigned Long to String ungetc() Push Character Back onto the Stream ungetch() Push Back the Last Character Read from the Console unixtodos() Convert Date and Time to DOS Format unlink() Delete a File unlock() Release File-Sharing Locks va_arg() Access Variable Number of Arguments, ANSI C Style vfprintf() Write Formatted Data to Stream vfscanf() Perform Formatted Input from a Stream vprintf() Write Formatted Data to Stdout vscanf() Perform Formatted Input from Stdin vsprintf() Write Formatted Data to String vsscanf() Perform Formatted Input from String write() Write Data to a File _write() Write Data to a File Turbo C Keywords +asm extern return +_cs +_DH auto +far short +_ds +_DL break float *signed +_es +_DX case for sizeof +_ss +_BP +cdecl goto static +_AH +_DI char +huge struct +_AL +_SI *const if switch +_AX +_SP continue int typedef +_BH default +interrupt union +_BL do long unsigned +_CH double +near *void +_CL else +pascal *volatile +_CX *enum register while Table of C Escape Sequences Escape Sequence Meaning Value \a bell (alert) 0x07 \b backspace 0x08 \f formfeed 0x0C \n newline (linefeed) 0x0A \r carriage return 0x0D \t horizontal tab 0x09 \v vertical tab 0x0B \\ backslash 0x5C \' single quote 0x2C \" double quotes 0x22 \? question mark 0x3F \DDD byte value in octal notation (1 to 3 digits) \xHHH byte value in hexadecimal notation (1 to 3 digits)