How to start learning C programming in the Turbo C ++ IDE

Table of contents:

How to start learning C programming in the Turbo C ++ IDE
How to start learning C programming in the Turbo C ++ IDE
Anonim

C is one of the oldest and most powerful programming languages, developed in the 1970s by Dennis Ritchie. However, if you learn to program in C, then other languages will not be too difficult for you. This article can help you get started with learning the C programming language using the "Turbo C ++ IDE" compiler.

Steps

Step 1. Download Turbo C ++ IDE to your operating system

  • Turbo C ++ may not work in Windows Vista and Windows 7. You may need to run the compiler in the “DosBox” program.
  • Start Learning C Programming in Turbo C ++ IDE Step 1
    Start Learning C Programming in Turbo C ++ IDE Step 1
  • Install DOSBox software with version 0.74
  • Start Learning C Programming in Turbo C ++ IDE Step 1
    Start Learning C Programming in Turbo C ++ IDE Step 1
  • Create a folder, for example “Turbo” (C: \ Turbo):
  • Start Learning C Programming in Turbo C ++ IDE Step 1
    Start Learning C Programming in Turbo C ++ IDE Step 1
  • Download and unzip TC into Turbo folder (c: \ Turbo):
  • Start Learning C Programming in Turbo C ++ IDE Step 1
    Start Learning C Programming in Turbo C ++ IDE Step 1
  • Start DOSBox 0.74 by clicking on the desktop icon:
  • Start Learning C Programming in Turbo C ++ IDE Step 1
    Start Learning C Programming in Turbo C ++ IDE Step 1
  • Write the following commands on the command line [Z]:
  • mount d c: \ Turbo [TC folder is inside Turbo folder]
  • Start Learning C Programming in Turbo C ++ IDE Step 1Bullet7
    Start Learning C Programming in Turbo C ++ IDE Step 1Bullet7
  • Now, you should see the message: Drive D is mounted as a local directory C: \ Turbo \
  • Start Learning C Programming in Turbo C ++ IDE Step 1Bullet8
    Start Learning C Programming in Turbo C ++ IDE Step 1Bullet8
  • Write d: to go to section d:
  • Start Learning C Programming in Turbo C ++ IDE Step 1Bullet9
    Start Learning C Programming in Turbo C ++ IDE Step 1Bullet9
  • Next, follow these commands:

  • cd tc

    cd bin

    tc or tc.exe

    [This will start Turbo C ++ 3.0]

  • In Turbo C ++ go to Options> Directories> Change TC source to source [D] folder (for example, virtual D: refers to C: \ Turbo \. So change the path to something like D: \ TC \ include and D: \ TC \ lib, respectively)
  • Start Learning C Programming in Turbo C ++ IDE Step 12
    Start Learning C Programming in Turbo C ++ IDE Step 12
  • You can save time by letting DOSBox automatically load your folders and run TurboC ++:
  • For DOSBox versions higher than 0.74 - open the dosbox.conf file in the program installation directory using any text editor. For version 0.73, go to the Start menu and click on “Configuration” and then on “Edit Configuration”. Scroll down to the bottom of the document and add lines that will automatically start when DOSBox starts up.
Start Learning C Programming in Turbo C ++ IDE Step 2
Start Learning C Programming in Turbo C ++ IDE Step 2

Step 2. Once you install the Turbo C ++ compiler, learn about the #include, printf (Printf is used to print messages to the console) and scanf (Scanf is used to scan messages from the console to memory) functions

Start Learning C Programming in Turbo C ++ IDE Step 3
Start Learning C Programming in Turbo C ++ IDE Step 3

Step 3. Create a simple Hello World script and run it

Congratulations, you've started learning C in the Turbo C ++ IDE! Step 4. Remember.

C is a high level programming language (HLL). It is case sensitive, modular and structured. Step 5. Learn about keywords.

These are predefined words reserved by the programming language. Each keyword has a specific function. You will not be able to use keywords for other purposes.

  • There are 32 keywords in the C language.
  • Start Learning C Programming in Turbo C ++ IDE Step 5
    Start Learning C Programming in Turbo C ++ IDE Step 5
  • Each word is case sensitive.
  • The keyword cannot be an identifier, variable, or function.
  • Examples of keywords: void, if, else, do.

Step 6. Learn about the variables

Variables are the names of blocks of memory that will store program values. To use variables, the programmer needs to label them.

Start Learning C Programming in Turbo C ++ IDE Step 7
Start Learning C Programming in Turbo C ++ IDE Step 7

Step 7. Datatype

They indicate the type of value represented by a particular variable. Below are the 4 most common and important data types; their formatting operator is indicated on the right side.

  • int% d
  • float% f
  • char% c
  • double% f (Yes, float & double have the same formatting operator)
  • Strings are part of char, but the formatting operator for strings would be% s
Start Learning C Programming in Turbo C ++ IDE Step 8
Start Learning C Programming in Turbo C ++ IDE Step 8

Step 8. Learn about arithmetic operators, logical operators, increment / decrement operators, conditional operators, flow control structure (if-else, if statement, nested if) and loops (while, do-while, for)

Start Learning C Programming in Turbo C ++ IDE Step 9
Start Learning C Programming in Turbo C ++ IDE Step 9

Step 9. Learn about arrays and sorts

Start Learning C Programming in Turbo C ++ IDE Step 10
Start Learning C Programming in Turbo C ++ IDE Step 10

Step 10. Learn about ASCII (American Standard Code Table for Printable Characters and Some Special Codes)

ASCII is sometimes used in C programming.

Start Learning C Programming in Turbo C ++ IDE Step 11
Start Learning C Programming in Turbo C ++ IDE Step 11

Step 11. Learn about pointers

Start Learning C Programming in Turbo C ++ IDE Step 12
Start Learning C Programming in Turbo C ++ IDE Step 12

Step 12. Start with simple and small programs and, then, move on to more complex problems. 13 Take specialized courses to improve your knowledge of C

Read books about C programming.

Remember, you cannot learn a programming language without a certain investment of time and effort

Sample Hello World Program

#include void main () {clrscr (); printf ("Hello World"); }

Advice

  • Once your code is ready, save your *.exe file.
  • Learn to debug programs.
  • If you are having trouble fixing your syntax error, try searching Google or other search engines. You can easily find people who can help you.
  • If you find a bug, please tell others about it. Don't hide it. Mistakes are the first step in learning a programming language.

Popular by topic