ankitweblogic logo
W e b t u t o r i a l s

Programing Approach


Flow Chart

Define C

Define Programming

C - Syntax

C - Variables

C - Keywords

C - Data Types

C - Comments

Turbo C - Shortcut keys

C - Operators

Hierarchy of Operators

Ex: Arithmetic Operator

Constant Variable

C - Escape Sequence

Control Structure - if

Ex: If condition

Ex: Inc / Dec Operator

C - loops

Ex: Loops

C - Nesting Of loops

Ex: Nested Loops

Jumping Statements

C - Arrays 1D

C - Arrays 2D

C - Sorting


Character I/O Function

C - Strings

Ex: Strings

Array of Strings

C - Math Functions

User-defined Function

Exercise Function

C - Types of Functions

Storage Class

C - Header Files

C - Preprocessor

C - Pointers

C - Structures

C - Typedef

C - File Handling

Ex: File Handling

Command Line Argument


Data Types in C

Data type specify what type of data is entered by a user. Data types are divided into two major categories:

  1. Primary Data Type
  2. Secondary Data Type

1. Primary Data Type : Primary data types is also known as Primitive or Pre-defined data types. It is divided into 3 categories.
a. Integer (Non-Decimal) : Only integer values are allowed.
b. Real (Decimal) : In Real data type, decimal values can be use.
c. Character : Character data type can store only single character.

SNo Data Type Size Format Range Category
1. int
signed int
2 Bytes %d -32768 to 32767 Non-Decimal
2. unsigned int 2 Bytes %u 0 to 65535
3. long
long int
4 Bytes %ld -2147483648 to 2147483647
4. unsigned long 4 Bytes %lu 0 to 4294967295
5. float 4 Bytes %f -3.4e38 to 3.4e38 Decimal
6. double 8 Bytes %lf -1.7e308 to 1.7e308
7. long double 10 Bytes %LF -1.7e4932 to1.7e4932
8. char 1 Byte %c 0 to 255 Character
9. array of char (string) Depends on characters %s Depends on characters

2. Secondary / Non – Primitive / User Defined Data Types : These data types are defined and use by user according to his requirements. Secondary data types contains:
a. Arrays
b. Pointers
c. Structure
d. Union
e. Enum
f. Typedef

Updated: 14-Feb-2019