Chapter 1
Chapter 1
Chapter 1
1. Popularity
2. Convenience of a high level language and speed of a low-level
language
3. Much closer control of a computer's hardware and peripherals
4. Fast code
5. Easy to understand and maintain code / syntax
Real-World Applications of C
• Operating systems
– Unix, MS Windows, Apple Mac, Symbian, Android, etc
• Development of new languages
– C#, Java, Limbo, JavaScript, Perl, PHP, Python, Verilog
• Computation Platforms
– MATLAB, Mathematicia
• Embedded Systems
Real-World Applications of C++
• Games
– Counter Strike, Doom, World of WarCraft, Birthright, Hellfire, Football, etc
• Web Browsers
– Google chrome, Mozilla Firefox, Internet Explorer, Safari, Opera, etc.
• Office Products
– MS Office, Apache OpenOffice, etc.
• Websites
– Facebook, YouTube, Amazone, Paypal
• Database Systems
– Oracle, MySQL, MS SQL Server, SAP DB, etc.
C/C++ Integrated Development Environment
• Turbo C
• Dev C++
• Eclipse
• Netbeans
• Code::Blocks
• GNAT programming studio
• Visual studio
• CodeLite
• Qt Creator
• Sublime Text
• C++ Builder
• CLion
• MonoDevelop
Turbo C - IDE
Dev-C++ IDE
C Compiler
C Development Envionment
C Execution Envionment
Files used in C Program Development
• After you have typed in the source file for the program, you
should save it on your disk or hard disk. To do this, select the
Save option from the File menu. You can also accomplish the
same effect simply by pressing the Ctrl+s key combination.
• You can save your source file as first.c or first.cpp.
• Its a good idea and programming practice to save your source file
before compiling and running your program.
Compiling and Making an .exe file
• After you have written the source file for your program, you need to
turn it into an executable file. The compiler, which is a part of the
IDE, translate the source code into another file known as (.obj)
Object file, consisting of the machine language.
• The linker then links the entire necessary object files together to
produce a final executable program with the extension (.exe).
• Compiling and linking can be performed together in one step
Exploring the printf ( ) Function
• The printf( ) function uses a unique format for printing constants
and variables. For example
{
printf ( “ The letter %c is” , ‘ j ’ ) ;
Online Resources:
1. https://www.learncpp.com/
2. C Programming For Beginners
Online C Compiler:
https://www.onlinegdb.com/