Loop Control Structure / Looping in C language / How to make loops in C language / Using for, while and do while in C language

The versatility of the computer lies in its ability to perform a set of instructions repeatedly .This involves repeating some portion of the program either a specified number if times or until a particular condition is being satisfied . This repetitive operation is done through a loop control instruction.

There are three methods by way of which we can repeat a part of a program. They are:

a) Using a for loop.

b) Using a while loop.

c) Using a do-while loop


Continue reading

Advertisements

Decision Control Structure / Decision taking in C language / If-Else Statements / Making multiple paths in C language

Continuing from the previous article the precedence of operators would be highly beneficial. In your life you do everything according to the circumstances. You think like if this happens, I would do this, if not then another plan is in your mind. So C language also gives you this facility of making decisions according to circumstances. Up till now we have developed programs whose flow are sequential, means line written first, executes first. This is not the simple case in serious program. For serious programming you have to be able to make decisions, the decision control structures will make you able to decide which part should execute first. The decision control instructions can be implemented in C by using.

Continue reading

Precedence of Operators / C language operator precedence / Order of precedence in C language

Now for proceeding to the next lesson of Decision Making Capability of C language, we must have some basic knowledge about theimportance of taking any decision or how importance is it in C language.Decisions are always the most important thing in our lives also, take anyexample from our lives, if someone is roaming in a new place and what he onlyknows is his destination, so when he would read the sign board that theparticular way leads to his desired place he would definitely choose that wayover others. Now relating it to the C language, when we (as a programmer) givechoice to user for more than one paths, then the user have the choice, whichway he wants to choose. The more you give the ease to user for variety ofdecisions the more effective your programming is. It simply asks the user to:

Continue reading

How to take input from user / to use C language basic function scanf / taking formated input from user / input from user prespective

Now when we have learnt how to print the basic text at the screen, some people might have thought that why would we always need to write something on the screen while we are coding our program, so the answer is that, the printf is basically a printing command, in order to take input from user we would use scanf, that takes input from user and transfer it to the processing machine.

Scanf can take input in the form of characters1, integers2, float3 etc. These three are some of the data types of C language, remaining data types would be cleared in further articles. By using scanf you can take information from user, it can ask questions from the user like, if someone is student we can make a form that asks his/her name, class, roll number, total marks and obtained marks. For this we would need English alphabets for name, class, total marks and obtained marks would be numbers and class roll number would be alphanumeric4(Alpha numeric means the characters comprising of alphabets as well as numbers).

The syntax used for scanf is simple and just like printf (learnt in lesson-3), the difference that creates sense is the symbol of Ampersand (&), that refers to some address. The information or data that we enter is saved at some place in memory and this sign refers to that address. For taking an input from user, we first have to make room for that storage; this room may be of an integer, character or float type. We would start from the integer is it would be easy to understand and making the firm basis.

Continue reading

Displaying text on Screen / Displaying desired text using printf command / Print formatted text at screen using C language function / Printing at Screen

We have earlier discussed about programming, so let’s start some real fun at C language. All you have to do is to install “Turbo C” in your computer and then you have to run Turbo C that is present in the “Bin” folder. Opening it will produce a blue window having no name; the good thing is you must save it before doing any work at it. Remember the short key for saving as it would be used again and again that is F2. Now we are beginning to the adventurous ride of C language.

<!–more–>

The question is what we have to do if we want to display something at C language interface1 in text form? (Graphical items display would be discussed later). The answer is simple, first we have to understand the easy syntax2 of this purpose and then we would apply it according to our needs.

Continue reading

How to Install C language / Install C language Compiler at your Personal Computer / Install C language at Windows XP

As you have read about the mind-blowing features of C language in order to install it at your PC you have to take the Setup or .exe file of Turbo C. After opening the file extractor you have to follow the following steps. In order to avoid vain errors install the C language in the partition in which your windows is installed because sometimes compiler refuse to compile due to this problem.

Continue reading

Introduction to programming / Programming Intro / Programming at different Languages / Making mind for programming / Programming is an easy job

Programming, a headache or a fun :p

Have you ever gone to the picnic? Yeah of course you would surely have visited many places, and for this you would have done some preparations also. You have many things in mind, and people try their best to fulfill all that they think. Like somebody visiting water-park, before he goes their he thinks that he would slide, swim have a wonderful lunch etc there. It’s all about what he thinks, but it’s not sure that he would do each and everything he thinks. Things he taught were his “PROGRAMMING” and what he applied and got was the outcome or you call “RESULT”. Whenever we need to do something we have to make our mind how do we have to do it and thinking this we design the whole agenda and work according to it. Sometimes we also feel that doing something would be difficult, so we escape that things. These all things made you a good programmer.

Continue reading