Introduction to C language.

C language is general purpose, procedural programming language supporting structured programming.

C language was originally developed at “Bell Labs” by Dennis Richie between 1972 ad 1973 to make utilities running on UNIX operating system. later it was applied to re-implementing the kernel of the UNIX operating systems.

Lets move towards the important portion of C language.The body of C language.

The structure of C program consists.

1. Header Files.

Header files are files with extension “.C” which contains c functions declarations and micro definitions to be shared between different source files. There are two types of header file:

a) Files comes with compiler.

b) Files developer writes.

some pre defined user files are:

  • <stdio.h>
  • <conio.h>
  • <graphics.h>
  • <math.h>
  • <string.h>

2. main() functions()

There are two types of function in c programming.

  • user defined function.
  • standard library function.

User defined functions:

A function is block of code that performs a specific task. C allows you to define functions according to our need and purpose. These functions are known as user defined functions.

Standard library functions:

standard library functions are built in functions in C language.

let us consider printf() function it is pre-defined function defined in header files itself. printf() function is use to send formatted output to the console screen. this function is defined in the stdio.h header file.

Also scanf() function is pre defined function in C programming. It reads the data from the user fro processing this function is also defined in stdio.h

3.Variable Declaration

In C programming, variables which are to be used in different portions of C program. The variable declaration tells compiler two things: The name of variable and The type of data variable will hold.

  for ex: datatype_(variable), 
int A;
int A[10];
float K;

4. Body

The Body contains the logic of the C program. It refers to the operation that are performed in the functions. It can be anything like manipulations, searching, sorting, printing,etc.

for ex: the logic for bubble sort is stepping through array elements and 
comparing the adjacent element.
let us organize the array elements in ascending order.

after running two loops we read the data elements and compare them
with adjacent left element if it is bigger then swapping happens.

temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
this is swapping logic behind the bubble sort.

5. Return

The return statement is use to terminate the execution of the function and transfer the program control back to the calling function it can be said as it returns the result.using the syntax return program is put to an end.


Saurabh

A digital marketer, programmer, and WordPress developer who is always looking for new technology stuff and news. Saurabh has 1+ years of experience in writing content and in web development.

5 Comments

Jenny · May 15, 2020 at 5:57 am

First off I would like to say superb blog! I had a quick question that I’d
like to ask if you do not mind. I was interested to find out how you
center yourself and clear your head prior to writing.

I’ve had difficulty clearing my mind in getting my ideas
out. I do take pleasure in writing but it just seems like the first 10 to 15 minutes are wasted simply just
trying to figure out how to begin. Any ideas or tips? Thanks!

Brooklynsmit · May 16, 2020 at 1:01 pm

Hello to every body, it’s my first pay a quick visit of this webpage; this webpage includes amazing and actually excellent material in favor of visitors.

Dylansmit · May 17, 2020 at 5:09 am

I am extremely impressed together with your writing talents as neatly as with the format for your weblog.
Is this a paid subject or did you customize it your
self? Either way keep up the excellent high quality writing, it’s rare
to see a great weblog like this one nowadays..

Kailee · May 17, 2020 at 7:10 am

Excellent site you’ve got here.. It’s hard to find high quality writing like yours these days.
I really appreciate individuals like you!

Take care!!

Natalie · May 17, 2020 at 5:23 pm

Nice blog here! Also your site so much up fast! What web host are you the usage of?
Can I am getting your affiliate link on your host? I desire my website loaded up as fast as yours lol

Leave a Reply

Your email address will not be published. Required fields are marked *