The surest test of understanding of programming language concepts is the ability to apply them in various problem-solving applications. This book serves this objective head-on. The features of C Language have been reviewed in brief and illustrated with several programming examples. The concepts have been sequenced in increasing order of complexity. The C features are extensively covered to help the reader in acquiring proficiency in this language. The lucid presentation makes the book as a self-study resource. A large number of programs provided are could also be adapted as building blocks for solving new problems. This book fills the gap of a resource on C that deals with the experimental aspects of this language.
The exercises not only reinforce the basic practical skills but also include challenging assignments for the motivated reader. The programming projects provide an opportunity to integrate the various practical skills learned and also illustrate the process of design and implementation of scaled down, real-life programs. The book is self-contained and will be a useful companion for a first course in C language anywhere.
1. Fundamentals of 'C': About C, Character set, Keywords, Identifiers, Data types, Constants, symbolic constants, Escape sequences, Variables, Exercises
2. Operators and Expressions: Introduction: Arithmetic operators: Relational Operators: Logical Operators, Assignment Operators, Unary Operators, Conditional Operator, Bitwise Operators, Operator Precedence Groups, Type conversion in expressions, Exercises.
3. Data Input/Output: Data Types and Operators: Program: The printf()' function, The scanf()' function The getchar()' and putchar()' functions The gets()' and puts()' functions The enum data type, typedef - user defined data type, sizeof() operator, Relational operators, Casting a value Exercises.
4. Formatting input and output: Program: Formatting integer output, Formatting real number output, Formatting single character output, Formatting string output, Formatting real number input, Formatting character and string input Exercises.
5. Control structures:Branching: Program: Simple if statement, The if.... else' statement, The nested if .....else statement, The else....if ladder, The 'switch; statement, The 'conditional operator' (?:), The goto statement. Looping Program: The while loop, The 'do....while' loop, The 'for' loop, The continue statement, Exercises.
6. Arrays and Strings: Arrays: Program: Declaration of one dimensional array, Initialization of one dimensional array, Reordering an array in ascending order, Declaration of two dimensional array, Initialization of two dimensional array. Strings: Program: Declaration and initialization of a string, Reading string from keyboard using the 'getchar( )' function, The function 'atoi( )', The function 'strcat( )', The function 'strcmp( )', The function 'strcpy( )', The function 'strlen( )', Sorting strings in alphabetical order, Exercises
7. Functions:Arithmetic functions: Program: The functions abs(i) and fabs(d), The functions ceil(d) and floor(d), The function exp(d), The functions log(d) and log10(d), The functions sin(d), cos(d) and tan(d), The function sqrt(d). User Defined functions: Program Functions with no arguments and no return values, Functions with arguments and no return values, Functions with arguments and return values, Function prototypes, Recursion, Passing an argument to a function, Call by reference, Passing an array to a function Exercises. Programming project 1
8. Storage classes: More about variables: Automatic storage class, Register storage class, Static storage class, External storage class Program Automatic storage class, Register storage class. Program: without static storage class, Static storage class, External storage class, Exercises.
9. Pointers: Program: Declaration and initialization of pointers, Pointer expressions, Accessing array elements using the pointer, Accessing string characters using the pointer, Pointers as function arguments, Passing an entire array to a function, Using pointers to two dimensional arrays, Arrays of pointers, Searching a string using a ragged array Exercises.
10. Structures and Unions: Structures, Unions. Structures: Program: Declaring and accessing a structure, Initialization of structure, Arrays of structures, Arrays within structures, Structure within structure, Passing individual structure elements to function, Passing an entire structure variable to function, Structure pointers. Unions: Program: Referencing union members, Initializing a union, Sharing of the same memory location, Comparing the size of a union and a structure, The little-endian format Exercises Programming project 2
11. Bitwise operators and Bit fields: Bitwise Operators, Bit Fields. Program: Creating bit pattern of given decimal number, Ones complement operator, Logical bitwise operator, Shift operators, Bit fields, Overlapping bit fields, Unnamed bit fields Exercises.
12. Dynamic Memory Management: Program: malloc() function, malloc() to store a single byte, char malloc(), calloc() function, calloc() function, Exercises.
13. Linked lists: Types of Linked Lists, Creation of a Linked List, Advantages of Linked Lists, Limitations of Linked Lists Program: Creating a linked list, Inserting an item in the linked list Exercises.Programming project 3
14. Stream-oriented Data files: Stream Oriented (Standard) Data Files, System Oriented (Low Level) Data Files, Opening and Closing a File. Program: Creating a data file to write a character, Reading data file character by character, Creating an integer data file, Reading an integer data file, Creating a data file containing a string, Reading a data file containing string, Creating a mixed data file, Reading a mixed data file, Updating a mixed data file, Copying a character from one data file to another, Command line arguments Exercises
15. Graphics Graphics Routines: Program: The putpixel( ), line( ) and outtextxy( ) functions, The rectangle( ) and circle( ) functions The ellipse( ) and arc( ) functions, The setfillstyle( ), bar( ), bar3d( ), drawpoly( ) and fillpoly( ) functions, The getmaxx( ), getmaxy( ), moveto( ), getx( ) and gety( ) functions , The setbkcolor( ), setcolor( ), getbkcolor( ) and getcolor( ) functions, The imagesize( ), getimage( ) and putimage( ) functions, Creating buttons, bars and boxes. Using the mouse: Program: Initializing and showing the mouse pointer, Setting horizontal and vertical limits for mouse pointer, Getting the mouse position and mouse button status, Drawing with the mouse, Shooting button with the mouse, Exercises Programming Project 4
16. Solved Problems: Program: Fibonacci numbers, Gain and beamwidth of a parabolic reflector, Roots of quadratic equation, Characteristic impedance of a transmission line, Surface resistance and microwave loss of gold-film, Transmission path distance for a satellite, Amplitude modulation, The characteristic impedance (Zo) of a coaxial cable (using conductor dimensions), Cut-off frequency, phase velocity and guide wavelength for a rectangular waveguide, Range of errors, Standard deviation, Maximum range for tropospheric transmission, Angle of inclination of satellite orbit due to latitude deviation, Conversion of mW power to dBm scale, Compound interest, Design of coils in resonant or tuning circuit , Frequency of oscillation of 3-section phase shift oscillator, Verification of truth table of AND, OR and XOR gates, Creating a list of laboratory equipment, Drawing a parabola, Radiation pattern of Yagi antenna, Design and simulation of a discrete time filters References.
Students of Computer Science in Engineering, Science and technology
Foreword: It is my pleasure to write a foreword for this book Application Programs and Projects. It is well known that programming is a practice-based skill. The surest test of comprehension of programming language concepts is the ability to apply them in various problem solving applications. This book serves this objective squarely. The features of C language have been reviewed in brief and illustrated with several programming examples. The concepts have been sequenced in an increasing order of complexity, as is appropriate. The coverage of C features is extensive for someone who is interested in acquiring proficiency in this language. The description is lucid throughout which makes the book useful as a self study resource. The large number of programs provided are ready to use programs that could also be adapted as building blocks for solving new problems. This book meets the crying need of a supplementary resource on C that deals with the experimental aspects of this language. The exercises not only reinforce the basic practical skills but also include challenging assignments for the motivated reader. The programming projects provide an opportunity to integrate the various practical skills learned and also illustrate the process of design and implementation of scaled-down real-life programs. The book is self contained and would be a useful companion for a first course in C language anywhere. Dr. Supratim Biswas, Professor of Computer Science and Engineering, Indian Institute of Technology, Bombay.
..those two books Dilip Mali-C application Programs and projects, Dilip Mali -Illustrated programming with C++ cover all related fundamental topics. The best thing about both books is the emphasis given to the programmes. many authors give more importance to theory instead of programmes and we know that C & C++, both are programming languages; we should give more examples for each & every topic. I will suggest these books to my students.......... Another +ve aspect is methodology. PROGRAMMING PROJECT..... With this title, students can do more practice in programming side...... KINJAL U. ADHVARYU, CE-IT DEPT, SOCET - AHMEDABAD