Unit 2 Lect 1 Program Structure
Unit 2 Lect 1 Program Structure
PROGRAMMING METHODOLOGY
UNIT- 2
LECTURE - 1
Recap Quiz
Q. _______ symbol denotes in flowchart, to
perform input and output operations.
a)Rectangle
b)Oval
c)Connector
d)Parallelogram
POLL
a)Declarative Programming
b)Imperative Programming
Today We will discuss:
• Programming Language
• C Program Structure
• Character Set
Programming language?
• Programming Language is
– A tool for instructing machines.
– A means of communicating between programmers.
– used to create programs that implement specific
algorithms.
• A programming language is a formal language which
comprises a set of instructions used to produce various kinds
of output.
About C
• C is a procedural programming language.
• It was initially developed by Dennis Ritchie
between 1969 and 1973.
• C language is case sensitive.
Features of C language
C Program Structure
A typical C program may be divided into six different sections
Sample Program
• Let us take a look at the various parts of the above program −
• The first line of the program #include <stdio.h> is a preprocessor command, which
tells a C compiler to include stdio.h file before going to actual compilation.
• The next line int main() is the main function where the program execution begins.
• The next line /*...*/ will be ignored by the compiler and it has been put to add
additional comments in the program. So such lines are called comments in the
program.
• The next line printf(...) is another function available in C which causes the
message "Hello, World!" to be displayed on the screen.
• The next line return 0; terminates the main() function and returns the value 0.
Structure of C program
Comments