C programming tutorials

Process Flow of C Programming C is a programming language developed in 1972 at AT & T’s Bell Laboratories. We write a C program using an editor and save the file with dot C extension. This file is known as our source code. Here in our example we have given our file name as my_first_prg.c .

Editor

We need one editor to write c program ( source code ) . We can use notepad as an editor but it lacks advance capability like syntax highlighter, help / suggestion etc. There are special editors available for writing C code and that helps in improving productivity.

Compiler

C Compiler We need a compiler to transform our source code to machine executable code. The compiler is available based on the operating system we are using. Since output of compiler is executable by operating system of the computer so a C compiler for windows is different than a c compiler for Unix. Same way compilers are developed based on specific requirement.

Integrate Development Environment (IDE) for C

There are IDE available with good quality editor and compiler as an integrated platform. It also allows you to select your own compiler. With graphical user interface ( GUI), easy to use buttons, debuggers , file browsers and code retrieval , saving as project etc , IDE helps in developing complex programs.

However beginners should avoid using IDE to understand the process by using simple editor and separate compiler.

Advantage of Learning C

Programming languages like PHP, C++, Java etc uses c programming concepts. By using C we can learn basic programming structure and it helps in learning advance programming languages.

The core C programming is still in use in many advance programming languages.

By using C we can program for new devices and develop drivers for interfacing with our operating systems. The Operating Systems for Microprocessor based embedded equipment like washing machine, digital cameras are written in C.

Because of its speed and accessibility to hardware , many Games are written using C program.

Reserved words

There are keywords which can’t be used as variables as compliers have used them. Some of such reserved keywords are here.
Auto
Break
Case
Const
Continue 
MathMath functions in C Program
BasicsBasics of C
samples Some sample codes in C
strings String functions in C
array Declare , Read , display and search array in C
pointers Pointers for storing address of variables
File handling Read write and append files
StructuresDeclaring reading and assigning value to Structures

Common Codes in C

To stop immediately closing of screen after executing the code you can integrate this code with your code. This will ask user to enter any char to close the program execution.
#include <stdio.h>
int main(){
char str_to_end;
printf(" Enter one char  ");
str_to_end=getchar();
printf(" You entered %c \n",str_to_end);
return 0;
}
Clearing the screen having previous program outputs
#include <stdio.h>
#include <conio.h>
int main(){
char str_to_end;
printf(" Enter one char  ");
str_to_end=getchar();
printf(" You entered %c \n",str_to_end);
clrscr();
return 0;
}
plus2net HOME


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Godson

    27-08-2012

    please i like to know when this tutorial is starting
    Monir Wahid

    15-06-2015

    take three numbers from user and display the largest number
    mohamed

    09-05-2018

    also i need projects in c language

    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer