<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4838598307971485467</id><updated>2011-10-28T10:09:47.341-07:00</updated><category term='Introduction'/><category term='program control'/><category term='Getting started'/><title type='text'>C-guide</title><subtitle type='html'>This is blog is all about C language.This consists of c programs,C basics,c puzzles,c material,c software download links,and everything about c</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-7507226106453406939</id><published>2008-11-05T23:06:00.000-08:00</published><updated>2008-11-05T23:09:30.188-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='program control'/><title type='text'>PROGRAM CONTROL</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;THE WHILE LOOP&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The C programming language has several structures for looping and conditional branching. We will cover them all in this chapter and we will begin with the while loop. The while loop continues to loop while some condition is true. When the condition becomes false, the looping is discontinued. It therefore does just what it says it does, the name of the loop being very descriptive. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Example program ------&gt; WHILE.C&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Load the program WHILE.C and display it for an example of a while loop. We begin with a comment and the program entry point main(), then go on to define an integer variable named count within the body of the program. The variable is set to zero and we come to the while loop itself. The syntax of a while loop is just as shown here. The keyword while is followed by an expression of something in parentheses, followed by a compound statement bracketed by braces. As long as the expression in the parenthesis is true, all statements within the braces will be repeatedly executed. In this case, since the variable count is incremented by one every time the statements are executed, it will eventually reach 6. At that time the statement will not be executed because count is not less than 6, and the loop will be terminated. The program control will resume at the statement following the statements in braces.We will cover the compare expression, the one in parentheses, in the next chapter. Until then, simply accept the expressions for what you think they should do and you will be correct for these simple cases.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Several things must be pointed out regarding the while loop. First, if the variable count were initially set to any number greater than 5, the statements within the loop would not be executed at all, so it is possible to have a while loop that never is executed. Secondly, if the variable were not incremented in the loop, then in this case, the loop would never terminate, and the program would never complete. Finally, if there is only one statement to be executed within the loop, it does not need delimiting braces but can stand alone. Compile and run this program after you have studied it enough to assure yourself that you understand its operation completely. Note that the result of execution is given for this program, (and will be given for all of the remaining example programs in this tutorial) so you do not need to compile and execute every program to see the results. Be sure to compile and execute some of the programs however, to gain experience with your compiler. You should make some modifications to any programs that are not completely clear to you and compile them until you understand them completely. The best way to learn is to try various modifications yourself. We will continue to ignore the #include statement and the return statement in the example programs in this lesson. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-7507226106453406939?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/7507226106453406939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=7507226106453406939' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/7507226106453406939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/7507226106453406939'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/11/program-control.html' title='PROGRAM CONTROL'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-7701479623644214067</id><published>2008-11-05T23:01:00.000-08:00</published><updated>2008-11-05T23:04:02.882-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Getting started'/><title type='text'>GOOD FORMATTING STYLE</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;GOOD FORMATTING STYLE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Example program ------&gt; GOODFORM.C&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Load the file GOODFORM.C and observe it on your monitor. It is an example of a well formatted&lt;/div&gt;&lt;div&gt;program. Even though it is very short and therefore does very little, it is very easy to see at a glance what it does. With the experience you have already gained in this tutorial, you should be able to very quickly grasp the meaning of the program in it's entirety. Your C compiler ignores all extra spaces and all carriage returns giving you considerable freedom in formatting your program. Indenting and adding spaces is entirely up to you and is a matter of personal taste. Compile and run the program to see if it does what you expect it to do.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example program ------&gt; UGLYFORM.C&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now load and display the program UGLYFORM.C and observe it. How long will it take you to figure out what this program will do? It doesn't matter to the compiler which format style you use, but it will matter to you when you try to debug your program. Compile this program and run it. You may be surprised to find that it is the same program as the last one, except for the formatting. Don't get too worried about formatting style yet. You will have plenty of time to develop a style of your own as you learn the C language. Be observant of styles as you see C programs in magazines and books. This covers some of the basic concepts of programming in C, but as there are many other things to learn, we will forge ahead to additional program structure. It will definitely be to your advantage to do the programming exercises at the end of each chapter. They are designed to augment your studies and teach you to use your compiler.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-7701479623644214067?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/7701479623644214067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=7701479623644214067' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/7701479623644214067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/7701479623644214067'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/11/good-formatting-style.html' title='GOOD FORMATTING STYLE'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-2433138099927239818</id><published>2008-10-31T20:52:00.000-07:00</published><updated>2008-10-31T20:55:10.078-07:00</updated><title type='text'>HOW DO WE ADD COMMENTS IN C?</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;HOW DO WE ADD COMMENTS IN C?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Example program ------&gt; COMMENTS.C&lt;br /&gt;Load the file named COMMENTS.C and observe it on your monitor for an example of how commentscan be added to a C program. Comments are added to make a program more readable to you but represent nonsense to the compiler, so we must tell the compiler to ignore the comments completely by bracketing them with special characters. The slash star combination is used in C for comment delimiters, and are illustrated in the program at hand. Please note that the program does not illustrate good commenting practice, but is intended to illustrate where comments can go in a program. It is a very sloppy looking program.The slash star combination in line 3 introduces the first comment and the star slash at the end of that line&lt;br /&gt;terminates this comment. Note that this comment is prior to the beginning of the program illustrating that a comment can precede the program itself. Good programming practice would include a comment prior to the program with a short introductory description of the program. The comment in line 5 is after the main program entry point and prior to the opening brace for the program code itself. The third comment starts after the first executable statement in line 7 and continues for four lines. This is perfectly legal because a comment can continue for as many lines as desired until it is terminated. Note carefully that if anything were included in the blank spaces to the left of the three continuation lines of the comment, it would be part of the comment and would not be compiled, but totally ignored by the compiler. The last comment, in line 15, is located following the completion of the program, illustrating that comments can go nearly anywhere in a C program. Experiment with this program by adding comments in other places to see what will happen. Comment out one of the printf() statements by putting comment delimiters both before and after it and see that it does not get executed and therefore does not produce a line of printout. Comments are very important in any programming language because you will soon forget what you did and why you did it. It will be much easier to modify or fix a well commented program a year from now than one with few or no comments. You will very quickly develop your own personal style of commenting.&lt;br /&gt;Some C compilers will allow you to "nest" comments which can be very handy if you need to "comment out" a section of code during debugging. Since nested comments are not a part of the ANSI-C standard, none will be used in this tutorial. Check the documentation for your compiler to see if they are permitted with your implementation of C. Even though they may be allowed, it is a good idea to refrain from their use, since they are rarely used by experienced C programmers, and using them may make it difficult to port your code to another compiler if the need should arise. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-2433138099927239818?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/2433138099927239818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=2433138099927239818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/2433138099927239818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/2433138099927239818'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/10/how-do-we-add-comments-in-c.html' title='HOW DO WE ADD COMMENTS IN C?'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-3979301272453107291</id><published>2008-10-31T20:46:00.000-07:00</published><updated>2008-10-31T20:51:46.196-07:00</updated><title type='text'>HOW DO WE PRINT NUMBERS?</title><content type='html'>Example program ------&gt; ONEINT.C&lt;br /&gt;&lt;br /&gt;Load the file named ONEINT.C and display it on the monitor for our first example of how to work with data in a C program. The entry point main() should be clear to you by now as well as the beginning  brace. The first new thing we encounter is line 5 containing int index; which is used to define an integer variable named index. The word int is a keyword in C, and can not be used for anything else. It defines a variable that can store a whole number within a predefined range of values. We will define an actual range later. The variable name, index, can be any name that follows the rules for an identifier and is not one of the keywords for C. The final character on the line, the semi-colon, is the statement terminator as discussed earlier. Note that, even though we have defined a variable, we have not yet assigned a value to it, so it contains an undefined value. We will see in a later chapter that additional integers could also be defined on the same line, but we will not complicate the present situation. Observing the main body of the program, you will notice that there are three statements that assign a value to the variable index, but only one at a time. The statement in line 7 assigns the value of 13 to index, and its value is printed out by line 8. (We will see how shortly. Trust me for the time being.) Later, the value of 27 is assigned to index, and finally 10 is assigned to it, each value being printed out. It should be intuitively clear that index is indeed a variable and can store many different values but only&lt;br /&gt;one value at a time of course.Please note that many times the words "printed out" are used to mean "displayed on the monitor". You will find that in many cases experienced programmers take this liberty, probably due to the printf() function being used for monitor display.&lt;br /&gt;To keep our promise, let's return to the printf() statements for a definition of how they work. Notice that they are all identical and that they all begin just like the printf() statements we have seen before. The first difference occurs when we come to the % character. This is a special character that signals the output routine to stop copying characters to the output and do something different, usually to output the value of a variable. The % sign is used to signal the output of many different types of variables, but we will restrict ourselves to only one for this example. The character following the % sign is a d, which signals the output routine to get a decimal value and output it. Where the decimal value comes from will be covered shortly. After the d, we find the familiar \n, which is a signal to return the video "carriage", and the closing quotation mark. All of the characters between the quotation marks define the pattern of data to be output by this statement. Following the output pattern, there is a comma followed by the variable name index. This is where the printf() statement gets the decimal value which it will output because of the %d we saw earlier. The system substitutes the current value of the variable named index for the %d and copies it to the monitor. We could add more %d output field descriptors anywhere within the brackets and more variables following the description to cause more data to be printed with one statement. Keep in mind however, that the number of field descriptors and the number of variable definitions must be the same or the runtime system will generate something we are not expecting. Much more will be covered at a later time on all aspects of input and output formatting. A reasonably good grasp of these fundamentals are necessary in order to understand the following lessons. It is not necessary to understand everything about output formatting at this time, only a fair understanding of the basics.&lt;br /&gt;Compile and run ONEINT.C and observe the output. Two programming exercises at the end of this  are based on this program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-3979301272453107291?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/3979301272453107291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=3979301272453107291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/3979301272453107291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/3979301272453107291'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/10/how-do-we-print-numbers.html' title='HOW DO WE PRINT NUMBERS?'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-8282266391837441597</id><published>2008-10-31T20:38:00.000-07:00</published><updated>2008-10-31T20:46:08.263-07:00</updated><title type='text'>YOUR FIRST C PROGRAM</title><content type='html'>&lt;div style="text-align: justify;"&gt;Example program ------&gt; TRIVIAL.C&lt;br /&gt;&lt;br /&gt;The best way to get started with C is to actually study a program, so load the file named TRIVIAL.C and display it on the monitor. You are looking at the simplest possible C program. There is no way to simplify this program or to leave anything out. Unfortunately, the program doesn't do anything.The word main is very important, and must appear once, and only once in every C program. This is the point where execution is begun when the program is run. We will see later that this does not have to be the first statement in the program but it must exist as the entry point. Following the main program name is a pair of parentheses which are an indication to the compiler that this is a function. We will cover exactly what a function is in due time. For now, I suggest that you simply include the pair of parentheses. The two curly brackets in lines 2 and 3, properly called braces, are used to define the limits of the program itself. The actual program statements go between the two braces and in this case, there are no statements because the program does absolutely nothing. You can compile and run this program, but since it has no executable statements, it does nothing. Keep in mind, however, that it is a valid C program. When you compile this program, you may get a warning. You can ignore the warning and we&lt;br /&gt;will discuss it later in this tutorial, or you can modify the program so that it appears as follows;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;This modified program must compile on any good C compiler since it conforms to the ANSI-C standard.&lt;br /&gt;We will explain the difference in these two programs later in this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A PROGRAM THAT DOES SOMETHING&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Example program ------&gt; WRTSOME.C&lt;br /&gt;For a much more interesting program, load the program named WRTSOME.C and display it on your monitor. It is the same as the previous program except that it has one executable statement between the braces plus the obligatory return statement.&lt;br /&gt;The executable statement is a call to a function supplied as a part of your C library. Once again, we will not worry about what a function is, but only how to use this one named printf(). In order to output text to the monitor, the desired text is put within the function parentheses and bounded by quotation marks. The end result is that whatever text is included between the quotation marks will be displayed on the monitor when the program is run.Notice the semi-colon at the end of line 5. C uses a semi-colon as a statement terminator, so the semi-colon is required as a signal to the compiler that this line is complete. This program is also executable, so you can compile and run it to see if it does what you think it should. It should cause the text between the quotation marks to appear on the monitor when you execute it.You can ignore the statements in lines 1 and 7 in this program and similar statements in each of the remaining programs in this chapter. These will be fully described later in this tutorial. We will also define why the word int is used at the begining of line 3. We have a few preliminary topics to cover before we get to these items.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ANOTHER PROGRAM WITH MORE OUTPUT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Example program ------&gt; WRTMORE.C&lt;br /&gt;Load the program WRTMORE.C and display it on your monitor for an example with more output and another small but important concept. You will see that there are four executable statements in this program, each one being a call to the function printf(). The top line will be executed first, then the next, and so on, until the fourth line is complete. The statements are executed sequentially from top to bottom.Notice the funny character near the end of the first line, namely the backslash. The backslash is used in the printf() statement to indicate that a special control character is following. In this case, the "n" indicates that a newline is requested. This is an indication to return the cursor to the left side of the monitor and move down one line. Any place within printed text that you desire, you can put a newline character to start a new line. You could even put it in the middle of a word and split the word between two lines.&lt;br /&gt;A complete description of this program is now possible. The first printf() outputs a line of text andreturns the carriage. (Of course, there is no carriage, but the cursor is moved to the next line on the monitor. The terminology carries over from the days of teletypes.) The second printf() outputs a line of text but does not return the carriage so that the third line is appended to the end of the second, then followed by two carriage returns, resulting in a blank line. Finally the fourth printf() outputs a line followed by a carriage return and the program is complete.&lt;br /&gt;After compiling and executing WRTMORE.C, the following text should be displayed on your monitor;&lt;br /&gt;This is a line of text to output.&lt;br /&gt;And this is another line of text.&lt;br /&gt;This is a third line.&lt;br /&gt;&lt;br /&gt;Compile and execute this program to see if it gives you this output. It would be a good idea at this time for you to experiment by adding additional lines of printout to see if you understand how the statements really work. Add a few carriage returns in the middle of a line to prove to yourself that it works as stated, then compile and execute the modified program. The more you modify and compile the example programs included with this tutorial, the more you will learn as you work your way through it.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-8282266391837441597?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/8282266391837441597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=8282266391837441597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/8282266391837441597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/8282266391837441597'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/10/your-first-c-program.html' title='YOUR FIRST C PROGRAM'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-5737505247257601246</id><published>2008-10-31T20:26:00.000-07:00</published><updated>2008-10-31T20:37:00.279-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Introduction'/><title type='text'>Getting Started</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;WHAT IS AN IDENTIFIER?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Before you can do anything in any language, you must know how to name an identifier. An identifier is used for any variable, function, data definition, etc. In the C programming language, an identifier is a combination of alphanumeric characters, the first being a letter of the alphabet or an underline, and the remaining being any letter of the alphabet, any numeric digit, or the underline. Two rules must be kept in mind when naming identifiers.The case of alphabetic characters is significant. Using INDEX for a variable name is not the same as using index and neither of them is the same as using InDeX for a variable name. All three refer to different variables.&lt;br /&gt;1.According to the ANSI-C standard, at least 31 significant characters can be used and will be&lt;br /&gt;considered significant by a conforming ANSI-C compiler. If more than 31 are used, all characters&lt;br /&gt;beyond the 31st may be ignored by any given compiler.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;KEYWORDS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are 32 words defined as keywords in C. These have predefined uses and cannot be used for any other purpose in a C program. They are used by the compiler as an aid to compiling the program. They are always written in lower case. A complete list follows;&lt;br /&gt;&lt;/div&gt;auto&lt;br /&gt;double&lt;br /&gt;int&lt;br /&gt; struct&lt;br /&gt;break&lt;br /&gt; else&lt;br /&gt; long&lt;br /&gt;switch&lt;br /&gt;case&lt;br /&gt; enum&lt;br /&gt;register&lt;br /&gt; typedef&lt;br /&gt;char&lt;br /&gt; extern&lt;br /&gt;return&lt;br /&gt; union&lt;br /&gt;const&lt;br /&gt; float&lt;br /&gt; short&lt;br /&gt; unsigned&lt;br /&gt;continue&lt;br /&gt;for&lt;br /&gt; signed&lt;br /&gt; void&lt;br /&gt;default&lt;br /&gt; goto&lt;br /&gt; sizeof&lt;br /&gt; volatile&lt;br /&gt; do&lt;br /&gt; if&lt;br /&gt; static&lt;br /&gt; while&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In addition to this list of keywords, your compiler may define a few more. If it does, they will be listed inthe documentation that came with your compiler. Each of the above keywords will be defined, illustrated,and used in this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;WE NEED DATA AND A PROGRAM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Any computer program has two entities to consider, the data, and the program. They are highly&lt;br /&gt;dependent on one another and careful planning of both will lead to a well planned and well writtenprogram. Unfortunately, it is not possible to study either completely without a good working knowledgeof the other. For that reason, this tutorial will jump back and forth between teaching methods of programwriting and methods of data definition. Simply follow along and you will have a good understanding ofboth. Keep in mind that, even though it seems expedient to sometimes jump right into coding the program, time spent planning the data structures will be well spent and the quality of the final program will reflect the original planning.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A WORD ABOUT COMPILERS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All of the example programs in this guide will compile and execute correctly with any good ANSI&lt;br /&gt;compatible C compiler. Some compilers have gotten extremely complex and hard to use for a beginning C programmer, and some only compile and build Microsoft Windows programs. Fortunately, most of the C compilers available have a means of compiling a standard C program which is written for the DOS environment and includes none of the Windows extensions. You should check your documentation for the capabilities and limitations of your compiler. If you have not yet purchased a C compiler, you should find one that is ANSI-C compliant, and that also has the ability to generate a DOS executable if you are planning to use the DOS operating system.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-5737505247257601246?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/5737505247257601246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=5737505247257601246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/5737505247257601246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/5737505247257601246'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/10/getting-started.html' title='Getting Started'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4838598307971485467.post-8048622988756156024</id><published>2008-10-30T23:20:00.000-07:00</published><updated>2008-10-31T01:00:27.397-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Introduction'/><title type='text'>About C</title><content type='html'>&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt;In &lt;span style="text-decoration: underline;"&gt;computing&lt;/span&gt;, &lt;b&gt;C&lt;/b&gt; is a general-purpose, cross-platform, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the &lt;span class="mw-redirect"&gt;Bell Telephone Laboratories&lt;/span&gt; for use with the Unix operating system.&lt;/p&gt;&lt;div style="text-align: justify; color: rgb(0, 0, 0);"&gt; &lt;/div&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt;Although C was designed for implementing system software, it is also widely used for developing application software.&lt;/p&gt;&lt;div style="text-align: justify; color: rgb(0, 0, 0);"&gt; &lt;/div&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt;It is widely used on a great many different &lt;span class="mw-redirect"&gt;software platforms&lt;/span&gt; and computer architectures, and several popular compilers exist. C has greatly influenced many other popular programming languages, most notably C++, which originally began as an extension to C.&lt;/p&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt; As a programming language, C is rather like Pascal or Fortran. Values are stored in variables. Programs are structured by defining and calling functions. Program flow is controlled using loops, if statements and function calls. Input and output can be directed to the terminal or to files. Related data can be stored together in arrays or structures. &lt;/p&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt; Of the three languages, C allows the most precise control of input and output. C is also rather more terse than Fortran or Pascal. This can result in short efficient programs, where the programmer has made wise use of C's range of powerful operators. It also allows the programmer to produce programs which are impossible to understand. &lt;/p&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt; Programmers who are familiar with the use of pointers (or indirect addressing, to use the correct term) will welcome the ease of use compared with some other languages. Undisciplined use of pointers can lead to errors which are very hard to trace. This course only deals with the simplest applications of pointers. &lt;/p&gt;&lt;p style="text-align: justify; color: rgb(0, 0, 0);"&gt; It is hoped that newcomers will find C a useful and friendly language. Care must be taken in using C. Many of the extra facilities which it offers can lead to extra types of programming error. You will have to learn to deal with these to successfully make the transition to being a C programmer. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4838598307971485467-8048622988756156024?l=c-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-guide.blogspot.com/feeds/8048622988756156024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4838598307971485467&amp;postID=8048622988756156024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/8048622988756156024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4838598307971485467/posts/default/8048622988756156024'/><link rel='alternate' type='text/html' href='http://c-guide.blogspot.com/2008/10/about-c.html' title='About C'/><author><name>aswin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
