C-PROGRAMMING
* C was developed at Bell Laboratories in 1972 by Dennis Ritchie. Many of its principles and ideas were taken from the earlier language B and B's earlier ancestors BCPL and CPL.
* C is a powerful general-purpose programming language. It is fast, portable and available in all platforms.
* Benefits of C As a middle level language, C combines the features of both high level and low level languages. It can be used for low-level programming, such as scripting for drivers and kernels and it also supports functions of high level programming languages, such as scripting for software applications etc.
* if you are a new programmer , this platform is right choice to learn c language
* let's start with your first program ; HELLO WORLD !
* role of header file in your program :
* C was developed at Bell Laboratories in 1972 by Dennis Ritchie. Many of its principles and ideas were taken from the earlier language B and B's earlier ancestors BCPL and CPL.
* C is a powerful general-purpose programming language. It is fast, portable and available in all platforms.
* Benefits of C As a middle level language, C combines the features of both high level and low level languages. It can be used for low-level programming, such as scripting for drivers and kernels and it also supports functions of high level programming languages, such as scripting for software applications etc.
* if you are a new programmer , this platform is right choice to learn c language
* let's start with your first program ; HELLO WORLD !
#include <stdio.h>
int main()
{
printf("Hello, World!\n");
return 0;
}
* role of header file in your program :
You need to use libraries that are necessary to run the program. The
stdio.h is a header file and C compiler knows the location of that file.every thing is already explaned in header file ,To use the file, you need to include it in your program using #include preprocessor.
* main() function
#include<stdio.h>
int main(){
}
The code inside the curly braces { } is the body of
main() function. The main() function is mandatory in every C program.
this program will not do anything but this is valid program.
* printf() function
the printf( function is used as output. it shows output on screen ; like in our program it will show Hello, World!
* return statement
the return statement ends the program but its not mandatory to use.
Key notes to remember
- All C program starts from the
main()function and it’s mandatory. - You can use the required header file that’s necessary in the program.
- C is case-sensitive; the use of uppercase letter and lowercase letter have different meanings.
- The statement in a C program ends with a semicolon.
Comments
Post a Comment