The idea of programming might sound like a frightening task, but don’t worry. We designed this blog so that you can get your feet wet without stepping into the deeper complexities of the programming.
This site is dedicated to all those people who want to learn the most basic but important Programming Language'C Programming'.
If done step wise C language is easy and fun to learn.
So lets get started.
Start reading from the First Post to understand C programming.You may read a desired topic from the labels.
One of the best methods to learn any programming language is to observe as much as programs you can , try editing them.
You can take a look at the various programs on this blog and feel free to ask if any doubts in with them.
Press Ctrl+D to add this page to your Favourites/Bookmarks for further reference.
Note:Your comments,queries and suggestions are welcome.Feel free to post them in the the comment boxes available after every post.

If you are interested in learning PHP, to create your own website or to spice up your existing website;here is the Best Tutorial available for PHP

Search C Programs,Compilers,Seminars ,Projects,etc.

Saturday, May 17, 2008

Using symbolic Constants(#define)

Using Symbolic constants(#define)


While developing a program in C language,we often use certain unique constants in a program.These const. may appear repeatedly in a C program,at number of places.
Foe example,if we want to calculate the area of n number of circles,we require a constant 3.14 which is the value of'pi'.
Now we may like to change the value of pi from 3.14 to 3.14159.To achieve this we will have to search through-out the program and explicitly change the value of pi whereever it has been used.If any value is left unchanged the program will produce wrong results.When we use variable ,value may change accidently,which results to wrong output.
To avoid these type of mistakes w use symbolic constants in our C program.
the syntax of a symbolic constant is;

#define symbolic name value


e.g.
#define pi 3.14159
#define total 100

Thursday, May 15, 2008

Inpu-output functions(Formatted)

Formatted Functions
The formatted functions used in C programming are printf and scanf functions.
Printf prints the formatted output on screen as specified in format specifier.This function can also be used for displaying all the datatype variables.
e.g.
printf(char,var1,var2,....);
This function is used to enter the data.

The scanf function accepts the formatted input from user as specified in format specifier & in variable address given as parameter.
e.g.
scanf("%d",&char);

Example:

main()
{
int x;
char A;
printf("\nx=%d",x);
printf("\nx=%c",ch);
printf("\nPress any key to continue");
getch();
}

In the program above \n is the new line character.


Inpu-Output functions(Unformatted)

The C environment assumes that the standard input device(keyboard) and the standard output device(Monitor) are always connected to the C environment.
Here's a list of some unformatted functions used in C along with their uses.






Input / Output
Functions



Unformatted functions











































getch() Waits for
user to press any key, returns the key pressed that can be assigned to
variable
getche() like getch()
but echoes character pressed to screen
getchar()Accepts
one character from user, terminates only when user presses enter. Even
if user typed more than one character return first one character only.
putchar() can pass
character type parameter, a single character that you want to appear on
screen.
gets() By passing
character array as parameter can. accept string input including spaces.
puts() By passing
character array as parameter can display the content of string


Wednesday, May 14, 2008

C - The Programmer's Language

C - The Programmer's Language
C language is widely famous and founds its applications everywhere because of its versatility and flexibility.In fact C language is a Programmers’s language.
Not all computer programming languages are for programmers. For instance the COBOL and BASIC are not the languages for programmers.C was created,influenced, and tested by working programmers.
That’s the reason C gives the programmer what the programmer wants.C is the language with few restrictions, few complaints, block structures, stand alone functions, and a compact
set of keywords.Using C Language , you can nearly achieve the efficiency of assembly code
combined with the structure of ALGOL.This has made C language highly popular between professional programmers.
C was initially used for systems programming.
Here are few example of system programming;
1) Operating systems
2) Interpreters
3) Editors
4) Compilers
5) File utilities
6) Performance enhancers
7) Real-time executives

C founds wide application in many because of its efficiency and portability.
Much of the world still runs on C code, and those programs will continue to be enhanced and
maintained.
In order to start programming one has to begin with C language.
C programming can be learned easily from this blog.
This blog helps ou start learning C programming.