0% found this document useful (0 votes)
17 views

C Language Programming: Agenda

Uploaded by

visualn8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

C Language Programming: Agenda

Uploaded by

visualn8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

C Language Programming Introduction

Agenda:
1. Why Programming
2. Types of Programming
3. Introduction to C
4. Benefits of C
5. Some Facts about C
6. Understanding First C Program
7. Executing using IDE

Why Programming Language?

 Computer cannot understand our Native language like English, French, Chinese, Hindi, etc… It will only
understand Binary Language (Machine Language) and as Humans we don’t understand binary so easily…
So we need now an intermediate solution like Programming Language.
 A programmer needs a programming language to develop an application.
 An Application is collection of meaning instructions so perform a specific task.
 When an application is executed, data is inputted to it and the same flows through the instructions and
generates output.
 As a developer when you are supposed to write an application, you have to instruct the computer to perform
an action as per your needs.

Types of Programming
1. System Programming.
a. Programs which are between OS and Hardware
b. Eg: Device Drivers
2. Application Programming.
a. Programs which are between user and the OS.
b. Eg: Notepad, Calculator, Paintbrush and so on.

Introduction of C

 C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie and Ken
Thompson to develop the UNIX operating system at AT&T Bell Labs.
 C was originally first implemented on the DEC PDP-11 computer in 1972 and was developed in assembly
language.
C Language Programming Introduction

Ken Thompson and Dennis Ritchie


 The language was named "C" because its features were derived from "B", which according to Ken
Thompson was a stripped-down version of the typeless BCPL programming language.
 In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C (The C

Programming Language), now known as the K&R standard. Both of them added lots of features to
language "C".

 Until the early 1980s, although compilers existed for a variety of machine architectures and
operating systems, the language was almost exclusively associated with Unix
 In 1989 the American National Standards Institute (ANSI) committe published a standard for C
(generally called "ANSI C")
 Today, the UNIX operating system, the C compiler, and essentially all UNIX applications programs have been
written in C

Benefits of ‘C’:
1. General Purpose Language and is Easy to Learn
2. Its Procedural Programming Language.
3. It’s the best alternative to coding in Assembly language which is very tough.
4. Flexibility towards both Systems Programming and Application Programming.
5. Availability of large number of operating systems.
6. Availability of extensive library function enhancing basic functions.
C Language Programming Introduction

7. Same C source code can be compiled for very wide variable of computers and OS. The language has

become available on a very wide range of platforms, from embedded microcontrollers to


supercomputers.

Facts about C
 Today C is the most widely used and popular System Programming Language.
 Today's most popular Linux OS and RBDMS MySQL have been written in C.
 Today many languages are derived from C , examples C++, Java, C#, Objective C and many more…

First C Program – Hello World


#include <stdio.h> //Preprocessor Command
int main() //Entry Point Method - main()
{ //Block of code begins
/* my first program in C */ //Comment
printf("Hello, World! \n"); //To print on Console Window
return 0; //End of function
} //Block of code ends.

Components of a ‘C’ Program:


 The main() Function
The only component that is required in every C program is the main() function. Under normal circumstances,
program execution starts at the first statement in main() and terminates at the last statement in main().
 The #include Directive
The #include directive instructs the C compiler to add the contents of an include file into your program during
compilation. An include file is a separate disk file that contains information needed by your program or the
compiler. These files are called header files and are supplied with your compiler. (For example, STDIO.H).
 printf()
The printf() statement is a library function that displays information on-screen
 return
The return statement returns a value of 0 to the operating system just before the program ends.

Free “C” Editor


1. Visit: http://www.programarts.com/cfree_en/download.htm
2. Download the software and install the same.
C Language Programming Introduction
Steps to develop first “C” program
1. Open the Editor
2. File  New
3. Write the code as given above
4. Press F5 to execute the program.
5. See the o/p in console window.

What is Compiler?
 Compiler is a special program which converts the source code (statements) of a particular language into
into machine language i.e. the instructions which the computer understands.
 The output of the compilation is called object code.
 Compiler is also responsible for checking the Syntax of the language and point out errors if any.

Build = Compilation + Linking = EXE

Command Line Argumentszn

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy