Let's first start with very small & simple programs to get basic idea of C programming code structure. We shall get the basic idea of variable declaration, scanning and printing etc.
We shall see the classic "Hello World!" program to get an insight of how a program is written in c. We have programs on variables available in c. These are most commonly used elementary variables. Also, we shall see how arithmetic operations can be performed in a c program.
There are programs which we use in our routine, or say a programmer's routine. These programs are easy to understand and should help in understanding style of C programming. We shall see here some of these programs and some cool tricks.
This segment is designed to give the learner an enhanced view of how loops work in c languages. We shall see simple loops like for, while and do-while, along with nested loops.
Lets see some simple loop program we use in day-to-day life −
This section is full of examples that uses nested loops in a controlled manner. We may see that the outer loop is controlling the inner one etc. We have taken the simplest examples which are very common too.
Array is a collection of homogenous data, arranged in sequential format. Learning the concept of arrays in C is very important as it is the basic data structure. Here, in this section, we shall look into some very useful array programs to give you insight of how C programming language deals with arrays.
These programs are basic and involves only a single array variable. We shall learn how to handle array variable in different situation.
These programs involve more than one array. This section should give you some easy techniques to handle more than one array variables in a program.
Strings are actually one-dimensional array of characters terminated by a null character '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null.
The following declaration and initialization create a string consisting of the word "Hello". To hold the null character at the end of the array, the size of the character array containing the string is one more than the number of characters in the word "Hello."
char greeting[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
If you follow the rule of array initialization then you can write the above statement as follows −
char greeting[] = "Hello";
In this section, we shall learn how to work with string C programming language. We have divided the examples in multiple sub-sections to have a better understanding of what we are doing −
These programs made specially to understand the basics of strings in C. These program deals with string as an array of characters.
These programs has more than one string variables. These should give you an insight of how to work with multiple string variables in C programming language −
A sentence or a line can be considered as a long string. The following programs deals with the same concept −
This section has been developed to introduce some common mathematical problems that can be solved using c programming language.
Lets start with some designated number and series to program. Here we shall see how to program to get Armstrong, Prime, Factorial numbers and Fibonacci series.
Here we shall learn how to program to find average and percentages.
All three of mean, median and mode are types of different kind of averages. Mean deals with common way of finding average. Median is the centeral value of a list and mode is a value in a list which occurs the highest number of time.
Some basic and general programs learnt in schools can provide us an insight of programming techniques. Here we shall see few of the general programs used in school mathematics.
A linked-list is a sequence of data structures which are connected together via links.
Linked List is a sequence of links which contains items. Each link contains a connection to another link. Linked list the second most used data structure after array. Following are important terms to understand the concepts of Linked List.
Link − Each Link of a linked list can store a data called an element.
Next − Each Link of a linked list contain a link to next link called Next.
LinkedList − A LinkedList contains the connection link to the first Link called First.
Here in this section we shall learn basic programming techniques using linked-lists.
This linked list has sequential one-way connection with adjacent nodes. It can only be parsed one-way. Here we shall learn the basic operation of singly list list.
Circular Linked List is a variation of Linked list in which first element points to last element and last element points to first element.
Doubly Linked List is a variation of Linked list in which navigation is possible in both ways either forward and backward.