Sample programs
• We are going to discuss some simple programs in turbo C before going to graphics program that is terminal in graphic mode. • So simple programs in text mode. 1) Program to print Hello world on different line. #include<stdio.h> #include<conio.h> int main() { int c= 5; for(int i=0;i<12; i=i+2) { gotoxy(c,i); printf("Hello world!"); c=c+2; } getch(); return 0; } Explanation: • we have also discussed prior about text mode in Turbo C let's understand it in short. • So this is the image representation of text mode where: 1) screen is divided in Rows and Columns. 2) we have 80 rows and 25 columns 3) Here first coordinate is of column and another is row example: (80,25) • 80 is column and 25 is row only in turbo C text mode it's reverse as it is normally. 4) program we did above is of Controlling the cursor with the help of function gotoxy( ) it's a functio...