project iccwin

7
Acknowledgements Any attempt at any level cannot be satisfactory completed without the support and guidance of learned people. We would like to express our immense gratitude to Ms Vartika Singh on computer programming for their constant support and motivation that has encouraged us to come up with this project. We are also thankful to all our colleagues who have rendered their whole hearted support at all times for the successful completion of this project.

Upload: anand-verma

Post on 23-Apr-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Project ICCWin

Acknowledgements

Any attempt at any level cannot be satisfactory completed without the support and guidance of learned people. We would like to express our immense gratitude to Ms Vartika Singh on computer programming for their constant support and motivation that has encouraged us to come up with this project.

We are also thankful to all our colleagues who have rendered their whole hearted support at all times for the successful completion of this project.

Page 2: Project ICCWin

INDEX

CHAPTER 1 INTRODUCTION TO C

Program Organisation

Hello

Program input What are “function parameters”? Console mode programs and windows programs An overview of the compilation process Technical notes The run time environment

An overview of the standard libraries

The “stdheaders.h” include file Windows specific headers

Passing arguments to a program

Iteration constructs Basic types

Declaration and definitions

Variable declaration Types Function declaration Function definitions Variable definition Statement syntax

Errors and warnings

Reading from a file

Page 3: Project ICCWin

Commentaries

Describing a function Describing a file

An overview of the whole language

Statements Declaration Pre-processor Windows specific defined symbols Structured exception handling Control-flow Windows specific syntax

Extensions of Icc-win32

A closer view

Identifiers Constants

The print family

Conversions The conversion flags The size specification The conversions Scanning values

Pointers

Operations with pointers Null pointers

Setjmp and longjmp

General usage Register variables and longjmp()

Simple programs

strchr strlen

Page 4: Project ICCWin

strlwr

Using arrays and sorting

How to sort arrays Summary of Arrays and sorting

Pointers and references

Structures and unions

Structures Structure size Defining new types Unions

Using structures

Fine points of structure use An important structure

Identifier scope and linkage

Top-down analysis

Extending a program

The problems with C-“Strings”

Memory management and memory layout

Functions for memory allocation Memory layout under windows

Memory management strategies

Stack based allocation

Counting words

The organization of the table Memory organization Displaying the results Code review

Page 5: Project ICCWin

Time and Date functions

Using structures (continued)

Lists Hash tables

Using function pointers

Numerical programming

Floating point formats What can we do with those numbers then? Numerical stability Complex numbers

Programming with security in mind

Always include a ‘default’ in every switch statement Pay attention to strlen and strcpy Do not assume correct input Watch out for Trojans

Pitfalls of the C language

Defining a variable in a header file Confusing = and == Forgetting to close a comment Easily changed block scope Using the ++ or – more than once in an expression Unexpected Operator Precedence Extra Semi-Colon in Macros Watch those semicolons! Assuming pointer size is equal to integer size Careful with unsigned numbers Changing constant strings Indefinite order of evaluation A local variable shadows a global one Careful with integer wrap around Problems with integer casting Octal numbers

Page 6: Project ICCWin

Bibliography

CHAPTER 2 STRINGS

Design criteria

Memory management The handling of exceptions Efficiency considerations C and C++

Description

Creating strings Copying Accessing the characters in a String String pointer operations

Implementation

String functions Joining strings Accessing Mapping and filtering Conversations File Operations Reversing a String Searching text Making a string from a pipe Joining strings Strmap Filters