Monday, September 9, 2013

Download and Install borland turbo cpp(c++)

how to install and download Borland turbo CPP(C++)?

1.) First step download the Borland turbo c by clicking this link borlandc.org.

2.) Make a folder named TC to your desired directory that you want to install the turbo c++(cpp).

3.) Extract the TurboC.zip

4.) Look and double click the file install.exe.

5.) And a dos base window will appear. Then press the enter key.

6.) After pressing the enter key. It will ask. Enter the source drive to use? or in other words the turbo c ask you what drive or directory you wish to install the turbo c. I choose the drive C:\ and press enter.

7.) After that it will ask the source files of turbo c++, locate and type the path where you save the extracted download from the step 1. I only type \turboc, because I paste it to C: directory. Then press enter again.

8.) Then after that the turbo C++ installer point the installation of program to the folder that you made named TC, prior to the step number 2. Press the down arrow key 2 times, then the Start Installation will be highlighted. Then press enter.

10.) Lastly the read me will prompt, just hit or press esc key to exit

That is the simple instruction with picture on where you can download and how to install turbo cpp(c++) in your computer.

DIFFERENT SYNTAX OF FOR LOOP IN CPP(C++)

There are different syntax of for loop in cpp(c++), but in tradition the syntax of for loop in c++ or c, looks like this:

For(initialization; condition; increment)
 Statement;

DIFFERENT SYNTAX OF FOR LOOP IN CPP(C++)

1. FOR LOOP w/o initialization - But do you think it is possible to remove the initialization; in for loop? If you say yes, your answer is correct, just remember declare the variable type and the initial value of that variable. Example I use x variable for the for loop:

Int x=0;
for(; x<5; x++)
 printf(“COUNT[%d]”,x);

*as you notice for(; x<5; x++) I have terminator(;) before the x<5, because if you remove that will get the following error:

  1. Code has no effect
  2. For statement missing
  3. Function should return a value

2. FOR LOOP w/o increment - Another different syntax of for loop is removing third statement which is the increment or decrement. But in-order to execute the for loop error free, you must include the increment or the decrement inside the for loop. Example:

Int x;
for(x=0; x<5){
 printf(“COUNT[%d]”,x);
 x++; 
}

3. FOR LOOP w/o initialization and increment - Then lastly, is the removing of both initialization and the increment or in other word the combination of the example one and two. Example:

Int x=0;
for(; x<=0;){
 printf(“COUNT[%d]”,x);
 x++; 
}

Remember there’s nothing wrong trying new thing in programming, it is much wrong if you don’t take a risk and try new things. I hope you enjoy reading my different syntax of for loop in cpp.