Learn Programming in Clanguage in 6 days / PDF

Learn Programming in Clanguage in 6 days / PDF













Table of Contents





QUICK START WITH C
GETTING INPUT, ARRAYS, CHARACTER STRINGS AND PREPROCESSORS 
OPERATORS, LOOPS, TYPE CONVERSION 
CONDITIONAL COMMAND EXECUTION 
SELECTION USING SWITCH STATEMENTS 
MORE ON FUNCTIONS
FUNCTION ARGUMENTS 
STRUCTURES
WORKING WITH CHARACTER STRINGS 
MORE STRING FUNCTIONS 
FILES
MORE ON FILES1
RANDOM ACCESS TO FILES 
DYNAMIC MEMORY ALLOCATION 1
PROGRAM ARGUMENTS AND RANDOM NUMBERS 



----------------------------------------

Sample of the pdf document 






Quick Start with C:


C programming language is perhaps the most popular programming language. 
 was created in 1972 by Dennis Ritchie at the Bell Labs in USA as a part of UNIX operating system. 

C was also used to develop some parts of this operating system. From that time C programming language has been the de facto programming language when fast programs are needed or the software needs to interact with the hardware in some way. Most of the operating systems like Linux, Windows™, and Mac™ are either
developed in C language or use this language for most parts of the operating system and the tools coming with it.

This course is a quick course on C Programming language. In our first lesson we will first write our first C program. 

We will then learn about printing to screen, variables and functions. We assume that you are
familiar with at least one of the popular operating systems.

For this course you can use the following compilers or Programming Environments

• Gcc and cc in Unix and Linux operating systems
• Borland C or Turbo C in DOS operating system or in Command line environment of windows
operating system
• “Bloodshed Dev-Cpp” integrated development environment (IDE) gives you a complete and
compact programming environment. It comes with “MinGW” and “GCC” C Compilers and
you should not need anything else for this course.

We use “Bloodshed Dev-Cpp” for this course and we suggest you also use it. “Bloodshed Dev-Cpp” is free and it can be downloaded from the website http://www.bloodshed.net (currently under the URL

Your first C program

Let's write our first C program.

Example 1-1: example1-1.c

#include <stdio.h>
main()
{
printf("Hello World!\n");
system("pause"); //this line is only needed under windows
}





First step for running this program is to make a text file containing above code. Be sure that the file is a pure text file. You must save the text file with .c extension.

Then you must compile the source code. The result of compile step is an executable file that you can run it.

If you are running your example on Unix/Linux type operating systems you can remove the line which is commented to be necessary just under Windows.





 Click here for  Download PDF / FREE


Learn Programming in Clanguage in 6 days / PDF




0 commentaires: