Tuesday, December 20, 2011

What is need to compile in "C"

To wrirte a C program you must have a C compiler . I can give you some link to download C compiler. down there.......

Monday, December 19, 2011

What You Can Do Now


Hour 24 - What You Can Do Now
It's not what you know, but what you can.
—A. Alekhine
Congratulations! You're now in the last chapter of this book. You just need to spend one more hour to complete your 24-hour journey. In this lesson you'll learn more about the C language from the following topics:

The C Preprocessor


Hour 23 - The C Preprocessor
Intelligence is the faculty of making artificial objects, especially tools to make tools.
—H. Bergson
In Hour 2, "Writing Your First C Program," you learned how to use the #include preprocessor directive to include C header files. Since then, the #include directive has been used in every program in this book. In this lesson you'll learn more about the C preprocessor and making macro definitions with the preprocessor directives. The following topics are discussed in this hour:

Disk File Input and Output: Part II


Hour 22 - Disk File Input and Output: Part II
Disk space: the final frontier.
—Captain Kirk's younger brother
In last hour's lesson you learned the basics of reading and writing disk data files. In this lesson you'll learn more about communication with disk data files. The main topics discussed in this hour are

Disk File Input and Output: Part I


Hour 21 - Disk File Input and Output: Part I
I can only assume that a "Do Not File" document is filed in a "Do Not File" file.
—F. Church
In Hour 5, "Reading from and Writing to Standard I/O," you learned how to read or write characters through standard input or output. In this lesson you'll learn to read data from or write data to disk files. The following topics are discussed in this lesson:

Another Way to Collect Dissimilar Data


Coming together is a beginning;
keeping together is progress;
working together is success.
—T. Roosevelt
In the previous hour's lesson you learned how to store data of different types into structures. In this hour you'll learn another way to collect differently typed data items by using unions. You'll learn about the following topics in this lesson:

Collecting Data Items of Different Types


The art of programming is the art of organizing complexity.
—W. W. Dijkstra
In Hour 12, "Storing Similar Data Items," you learned how to store data of the same type into arrays. In this hour, you'll learn to use structures to collect data items that have different data types. The following topics are covered in this lesson:

More Data Types and Functions


That's all there is, there isn't any more.
—E. Barrymore
In Hour 4, "Data Types and Names in C," you learned about most of the data types, such as char, int, float, and double. In Hour 15, "Functions in C," you learned the basics of using functions in C. In this hour, you'll learn more about data types and functions from the following topics:

Allocating Memory


It's just as unpleasant to get more than you bargain for as to get less.
—G. B. Shaw
So far you've learned how to declare and reserve a piece of memory space before it is used in your program. For instance, you have to specify the size of an array in your program (or the compiler has to figure out the size if you declare an unsized array) before you assign any data to it at runtime. In this lesson you'll learn to allocate memory space dynamically when your program is running. The four dynamic memory allocation functions covered in this lesson are

Applying Pointers


Think twice and do once.
—Chinese proverb
In Hour 11, "An Introduction to Pointers," you learned the basics of using pointers in C. Because pointers are very useful in programming, it's worth spending another hour to learn more about them. In this lesson, the following topics are discussed:

Functions in C


Form follows function.
—L. H. Sullivan
In Hour 14, "Scope and Storage Classes in C," you might have noticed that a function definition is always given first, before the function is called from a main() function. In fact, you can put a function definition anywhere you want, as long as you keep the function declaration at the first place before the function is called. You'll learn about many function features from the following topics covered in this lesson:

Sunday, December 18, 2011

Scope and Storage Classes in C


Nobody owns anything and all anyone has is the use of his presumed possessions.
—P. Wylie
In the previous hours, you've learned how to declare variables of different data types, as well as to initialize and use those variables. It's been assumed that you can access variables from anywhere. Now, the question is: Can we declare variables that are accessible only to certain portions of a program? In this lesson you'll learn about the scope and storage classes of data in C. The main topics covered in this lesson are

Manipulating Strings


I have made this letter longer than usual, because I lack the time to make it short.
—B. Pascal
In the last hour's lesson you learned how to use arrays to collect variables of the same type. You also learned that a character string is actually a character array ended with a null character \0. In this lesson you'll learn more about strings and C functions that can be used to manipulate strings. The following topics are covered:

Storing Similar Data Items


Gather up the fragments that remain, that nothing be lost.
—John 6:12
In last hour's lesson you learned about pointers and the concept of indirection. In this lesson you'll learn about arrays, which are collections of similar data items and are closely related to pointers. The main topics covered in this lesson are

An Introduction to Pointers


The duties of the Pointer were to point out, by calling their names, those in the congregation who should take note of some point made in the sermon.
—H. B. Otis, Simple Truth
You've learned about many important C data types, operators, functions, and loops in the last 10 hours. In this lesson you'll learn about one of the most important and powerful features in C: pointers. The topics covered in this
hour are

Getting Controls


Hour 10 - Getting Controls
It is harder to command than to obey.
—F. Nietzsche
In Hour 7, "Doing the Same Thing Over and Over," you learned to use the for, while, and do-while statements to do the same things over and over. These three statements can be grouped into the looping category that is a part of the control flow statements in C.
In this lesson you'll learn about the statements that belong to another group of control flow statements—conditional branching (or jumping), such as

Playing with Data Modifiers and Math Functions


Hour 9 - Playing with Data Modifiers and Math Functions
If at first you don't succeed, transform your data.
—Murphy's Laws of Computers
In Hour 4, "Data Types and Names in C," you learned about several data types, such as char, int, float, and double, in the C language. In this hour, you'll learn about four data modifiers that enable you to have greater control over the data. The C keywords for the four data modifiers are
  • signed
  • unsigned
  • short
  • long
You're also going to learn about several mathematical functions provided by the C language, such as