C Tutorial

Define C

Define Programming

Programming Approach

First C Program

TurboC Shortcut keys

Compiler vs Interpreter

C Variable

C Keywords

C Data Types

C Comments

C Operators

Hierarchy of Operators

Ex: Arithmetic Operator

C Formatting Output

C Escape Sequence

C if statement

Ex: If statement

C Switch statement

Ex: Switch

Increment / Decrement

C Loops

Ex: Loops

C Nesting Of Loops

Ex: Nested Loops

C Jumping Statements

C Exit(), Gotoxy()

C Arrays 1D

Ex: Arrays 1D

C Arrays 2D

Ex: Arrays 2D

C Sorting

ASCII Value

Character I/O Function

Ex: Character

C String Functions

Ex: Strings

Array of Strings

C Math Functions

User-defined Function

Exercise Function

Local, Reference variable

Function Calling types

Array Passing Function

Recursion Function

Ex: Recursion Function

Constant Variable

Storage Class

C Header Files

C Preprocessor

C Pointers

Pointer to Pointer

C Structures

Exercise Structure

C Typedef

C Enumeration

C File Handling

Ex: File Handling

Command Line Argument

MCQ

Question-Answer

Page Stats

Visitor: 354

C Typedef

Typedef statement is use to define a new data type that are equivalent to existing data type.

Exercise 1: Program to use User-defined type declaration (typedef)

#include<stdio.h>
#include<conio.h>
typedef int number;
void main()
{
   typedef float real;
   number a = 10;
   real b = 10.123;
   clrscr();
   printf("A = %d\nB = %f",a, b);
   getch();
}
A = 10
B = 10.123000