Coupon Accepted Successfully!


Typing and Executing Programs

  • C++ programs are created using many text editors.

  • For UNIX operating system vi or ed text editor is used

  • For Windows operating system turbo c++ or Borland c++ can be used.

  • Each program is stored with an extension which shows the type of program it belongs to.

  • Some extensions are .c, .cc, .cpp, .cxx etc.,.

Working of C++ program using Turbo c++

  • The steps to be followed for executing a program using turbo c++
    • Open the editor using DOS Mode
    • Start → Run type command and click enter.
    • A Dos mode opens. Check the path were turbo c++ is stored.
    • Type the path for example
      • C:\tcc\bin\tc
    • A new window will be opened
    • Type the program on the window.
    • Save the program by pressing Alt + F + S, with the file name using .cpp as extension
    • Compile the program by pressing Alt+F9
    • Run or execute the program by pressing Ctrl + F9
    • The input is requested.
    • Give the input
    • Hence the compiler compiles and displays the output on the screen
To save a file press F2 in the function key, this asks for the file name. Give the file name with the extension as .cpp. Hence the file is saved

Types of Errors

  • There are many types of errors occurs during compiling time.
  • They are as follows:
    • Syntax error: It occurs when the rules of the programming language is misused.
    • Type Error: It occurs when the user types a wrong data.
    • Logical Error: It occurs when the logic is wrong, and the result will be incorrect.
    • Run time Error: It occurs during the execution of a process.

Test Your Skills Now!
Take a Quiz now
Reviewer Name