C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index

 

 

 

 

The C Data Types, Statements, Operators, Operands and Expressions Sample Codes Index Page

 

This page provides links to the basic C program constructs which cover the basic data types, statements, operators and operands also expressions. The sample programs demonstrate the basic structure of the C program which must be based on the proper syntax to get the appropriate semantics.

 

C Data types (Simple C program examples to demonstrate the data types)

  1. Displaying the various C data types and their sizes program example

  2. Doing the hexadecimal, binary and ASCII conversion in C programming

  3. How to convert different computer numbering base which are binary, decimal, hexadecimal and octal in C programming

  4. Doing various computer base numbering conversions in C programming: decimal, hexadecimal, octal and binary

  5. The binary to decimal computer numbering system conversion C program example

  6. Converting the decimal value input by user from standard output to the binary equivalent

  7. Doing the C ASCII character, decimal, hexadecimal and octal conversion in C programming

  8. How to use the C escape sequences in C programming

 
 

C Statements, Operators, Expressions (Sample programs related to C statements, operators and expression)

  1. Using simple steps on completing a C program by writing code-build the program-add code/functionalities-rebuild the program

  2. How to use the End-Of-File (EOF) in C program to signal the stop of reading from standard input

  3. How to read from standard input using getchar() and write to standard output using putchar() C functions

  4. The AND, OR, Exclusive OR, one complement and bitwise operators and their operations C program example

  5. Converting the decimal to binary numbers using bitwise operator in C program

  6. How to use C conditional operator to simplify the syntax of the relational expression

  7. The C compound statements to simplify the C arithmetic syntax program example

  8. How to compare integers using operator precedence and relational operators

  9. How to construct and use the C relational expressions and logical operators

  10. Comparing the two given integers using the if-else C syntax for greater than, less than or equal

  11. Comparing the given two integers using the if conditional selection of the C syntax for greater than, less than or equal

  12. Calculate hours, minutes and seconds for the given seconds using modulus operator of the C program

  13. Formatting the standard output using printf() C function for character, string, integer and float

  14. The C postfix, prefix operators and the whitespaces effects program example

  15. Another very simple mathematical operation to show C operators, operands and their operations

  16. A very simple C operators, operands and basic mathematics operations code sample

 

C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index