Learn C Programming Language

Topic: Learn C Programming Language

How to Learn C Language Programming?

This C language Programming Tutorial is meant to help the reader learn how to program in C. It contains a short and concise tutorial introduction to get new users started as soon as possible.

Introduction To C Programming Language

C is a general-purpose high-level programming language. The C Language was developed by Dennice Ritchie at AT&T Bell Labs in 1972. C was originally designed for and implemented on the UNIX operating system on the DEC PDP-11, by Dennis Ritchie.

The Basic Structure of C Program Hello World

1
2
3
4
5
 #include <stdio.h> 
 main() 
 { 
   printf("Hello World"); 
 } 

How This Program Works?

1. include information about standard library header file stdio.h
2. define a function called main that received no arguments.
3. statements of main are enclosed in braces { }
4. main calls library function printf( ) to print this sequence of characters ‘Hello World’ on the screen
5. Some of the C compilers like Turbo C need a last statement like getch(); or getche(); to be used to stay the output screen until the user presses a character (key). Actually getch() or getche() are used to input a character. Hence the C program will wait for the user input. As soon as the user will press a character (key) from the keyboard, the program will terminate and the output window is closed.

The first C program – Printing “Hello World”

  • The first line is a preprocessor directive to include a header file because we have used printf()
  • The second line of code is the header of a function main() which is the starting point of our C program.
  • The third line is an opening brace {. The statements of a function are enclosed in braces { }.
  • Fourth line is a call to printf() function. Theerefore, the function main contains only one statement, that is printf(“Hello World”);
    The printf( ) function will display the string Hello World on the screen.
  • The last line of code is a closing brace }, to indicate the end of C program.

C Programming – Good collection of c programs

Here is a list of C Programming Topics or Categories.  There will be a lot of C Programs to be added under these  Categories or Topics.

C Programming Example Programs With Tutorials on Learning C

C Programming Example Programs With Tutorials on Learning C

You will also like:

100 Important Programs to Learn C Language

100+ Important C Programs for Beginners

  1. Basic Formula Calculation Programs in C Language

  2. Simple if statement C Programs

  3. if else Statement Programs in C language

  4. Conditional Operator or Ternary Operator Programs in C Programming

  5. Programs of Nested if else statement in C Programming

  6. C Programs using switch statement

  7. C Programs using Loop / Iterative statements for loop, while loop , do while loop

  8. C Loop Programs for printing Star Patterns / Shapes

  9. Print Number Patterns  in C Programming

  10. Print Alphabet Patterns Programs in C Programming

  11. Programs Using Functions in C Programming

  12. One Dimensional Array Programs in C Language

  13. C Programs on C Files / File Handling in C Programming