Wednesday, 18 June 2014

// // Leave a Comment

Basics of C programming : A Motivating programming lectures [ PART 1 ]

Basics of C programming : A Motivating programming lectures I know majority of Computer science and engineering students some times think " oh progrmming! it's hard. is it ? Sorry this article is not for the Good progrmmers. This is my initiative article. When i was in the time of engineering field, i can see a lot of student which hates programming. This articles for those friends.

overview of C
Basics of C programming

Today progamming can change the world movement also. We can't see till any software with out any programming language. There are lot of programming language are there. One of the Simple and early one is C programming. The variable C has no meaning. It just C. I think most of the student not aware of the programing language. Because they don't know the basics of the programming.

Let us start with the basic of C programming. I think after reading my lecture, you know about something about C. I don't want to make complete programmer. I want know the programming basics and passion toward the programming language. For that first thing you need is Hope. Hope can changes all thing. ok, look at these lectures.

An overview of C programming 

C character set :

Alphabets : A,B,.....Z and a,b,.....z
Digits        :0,..9
some special symbols:+,-,/,*, !,&,=,<,>,:,; etc..   

Keywords:

C has a 32 keywords.These can not used for variable names. Example of keywords are do,while,int,sizeof,char etc...

Datatypes:

C has a 4 variable data type int,char,float,double.

Structre:

To store some information , C uses structre. These is hetrogeneous.because all type of datatype can used there.
Struct name of struct {
char name[10];
int age[10];
float percentage;
}

Array: 

Array is a homogeneous data structure.(same data type used). Array can be single or multi dimensional.
Single :  Datatype array name[ ] eg: int age[10]  which crate a sigle row field
multi   :  Datatype array name[ ] [ ] eg: int bb[10][20] which create a multi row field.
 

 Union:

It is syntactically same as structre. But the difference is in structre each membre uses sepereate memory location. But in union all memberes uses the same memory location.
union name{
int x;
float y;
char g;
}list name;
 

Enumerated data types: 

It provide the possible values of a variable.
enum name{
enumerated constant-1;
enumerated constant-2;
.........
enumerated constant-n;
}
 

Typedef: 

It used for the alternative data type names.
eg: main( )
     {
     typedef unsigned char XYZ
     XYZ b;
     b=10;
     printf("%d",b);
    }                        Answer 10
Here XYZ can be used for datatype unsigned char.

Like this article ? please share on your social network »»



0 comments:

Post a Comment