typename specifies the variable type and must be one of the keywords. You can declare multiple variables of the same type on one line by separating the variable names with commas. The typedef keyword is used to create a new name for an existing data type. In effect, typedef creates a synonym

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

The Result of program after execution will be displayed as:

A char is 1 bytes

An int is 2 bytes

A short is 2 bytes

A long is 4 bytes

An unsigned char is 1 bytes

An unsigned int is 2 bytes

An unsigned short is 2 bytes

An unsigned long is 4 bytes

A float is 4 bytes

A double is 8 bytes

a = 1023
a = 1777
a = 3ff
b = 2222
c = 123
d = 1234
e = X
f = 3.141590
g = 3.141593

a = 1023
a = 1023
a = 1023
a = 1023
a = 1023

f = 3.141590
f = 3.141590
f = 3.142
f = 3.14159
f = 3.14159


Before its use, a variable in a C program, it must be declared. A variable declaration tells the compiler the name and type of a variable and optionally initializes the variable to a specific value.

If your program attempts to use a variable that hasn't been declared, the compiler generates an error message. A variable declaration has the following form:

typename varname;

typename specifies the variable type and must be one of the keywords. varname is the variable name. You can declare multiple variables of the same type on one line by separating the variable names with commas:

int count, number, start; /* three integer variables */
float percent, total; /* two float variables */

The typedef Keyword

The typedef keyword is used to create a new name for an existing data type. In effect, typedef creates a synonym. For example, the statement

typedef int integer;

here we see typedef creates integer as a synonym for int. You then can use integer to define variables of type int, as in this example:

integer count;

So typedef does not create a new data type, it only lets you use a different name for a predefined data type.


Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20

 
 

page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37

 
 

page 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54

 
 

page 55 | 56 | 57 | 58 | 59 | 60

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor