1.2) Introduction About Editors - Turbo, Vi, Emacs, Dev C++, Turbo C Editor
1.2) Introduction About Editors - Turbo, Vi, Emacs, Dev C++, Turbo C Editor
2) Introduction about Editors –Turbo, Vi, Emacs, Dev C++, CodeBlocks IDE
Turbo C Editor:
Turbo C is a discontinued Integrated Development Environment and compiler for the C
programming language from Borland. First introduced in 1987, it was noted for its integrated
development environment, small size, fast compile speed, comprehensive manuals and low
price.
• For opening a new file: Go to File menu -> New -> filename.c
• For saving a new file : File menu -> Save
• For Compiling: press the keys Alt + F9
• For Running: press the keys Ctrl + F9
Vi Editor:
Vi (or visual editor) is a powerful and helpful full screen editor that is always available on
UNIX systems. Vi is particularly useful if you write programs and scripts.
Syntax: vi filename.c
In insert mode you can enter new text in the file. Press Esc key to exit insert mode and return
to command mode. The following commands invoke insert mode:
Emacs Editor:
Emacs is another editor available in UNIX. Like vi, emacs is a screen editor.
Unike vi, emacs is not an insertion mode editor, meaning that any character typed in emacs is
automatically inserted into the file, unless it includes a command prefix
Dev-C++:
Dev-C++ allows you to write, compile and run a C or C++ program. Dev-C++, developed
by Bloodshed Software, is a fully featured graphical IDE (Integrated Development
Environment), which is able to create Windows or console-based C/C++ programs using the
MinGW compiler system.
Create/add source file(s):
You can add empty source files one of two ways:
Go to the "File" menu and select "New Source File" (or just press CTRL+N) OR
Go to the "Project" menu and select "New File"
Save:
Dev-C++ will not ask for a filename for any new source file until you attempt to: Compile.
Save the project. Save the source file.
Compile :
Once you have entered all of your source code, you are ready to compile.
Go to the "Execute" menu and select "Compile"
Execute :
You can now run your program.
Go to the "Execute" menu, choose "Run".
CodeBlocks IDE:
Code::Blocks is a powerful IDE for creating, compiling, executing and debugging C/C++
programs. Code::Blocks is a cross-platform IDE that supports compiling and running
multiple programming languages.
Steps:
1. Open CodeBlocks IDE and create a new file. Click on File → New → File
2. From the New form template window select C/C++ source and click Go button
3. Select your language from C/C++ source window and click Next button.
4. Give name to your file and specify the location.
5. Write and save your first C program. Press Ctrl + S to save.
6.To compile and run a C program, click Build → Build and run to compile and build your C
program, alternatively use the shortcut key F9.
Experiment-1: Introduction to C Programming
Example:
[root@localhost ~]$ ls
Example:
Syntax: pwd
Example:
/home/root/aditya/cse
Example:
Welcome
To c programming lab
Example:
Welcome
To c programming lab
Example:
Welcome
To c programming lab
5.Command name: cp
Welcome
To c programming lab
6.Command name: mv
Example:
Welcome
To c programming lab
7.Command name: ls
Syntax: ls filename
Example:
Example:
9. Command name: rm
Syntax: rm <filename>
Example:
[root@localhost ~]$ rm nk
Description: Print the file name of the terminal connected to standard input
Syntax: tty
/dev/pts/76
Description: Print information about users who are currently logged in.
Syntax: who