Structured
Programming
Practicum,
Programming
Fundamentals
Programming Fundamentals -
SE1102
– Credit Value: 02
– Hourly Breakdown: Theory – 15, Practical- 30, Independent Learning – 55
– Continuous Assessment :30%
– Mid-term : 80%
– Assignments :20%
– Final Assessment :70%
– Theory: 50%
– Practical:50%
3 What is a Hardware?
– Computer Hardware refers to the physical parts of a
computer and related devices.
– Examples of Hardware in a computer are the keyboard,
the monitor, the mouse and the central processing unit.
– In contrast to software, hardware is a physical entity.
4 What is a Software?
– Software is a set of programs, which is designed to
perform a well-defined function.
– Ex: Excel, Word, PowerPoint.
– A program is a sequence of instructions written to solve a
particular problem.
5 Programming Languages
– A programming language is a vocabulary and set of
grammatical rules for instructing a computer or
computing device to perform specific tasks.
– In simple words “A programming language is a set of
commands, instructions, and other syntax use to create a
software program.”
6 What is structured
programming?
– Structured programming is an approach to writing clear and
organized programs.
– Structured programming provides tools such as subroutines
or functions, block structure, control statements etc. which
helps to properly direct the flow of program.
– Structured programing is the set of design and implementation
processes that yield well-structured programs.
7 Structured programming
languages
– C
– C+
– C++
– PERL
– Ruby
– ALGOL
– Pascal
– Etc…
8 C Language
– C programming language is a MUST for students and working professionals to
become a great Software Engineer specially when they are working in Software
Development Domain.
– Here I list down some of the key advantages of learning C Programming:
– Easy to learn
– Structured language
– It produces efficient programs
– It can handle low-level activities
– It can be compiled on a variety of computer platforms
9 C Programming
– C is a powerful structured programming language, build
from
– Variables and type declarations
– Functions
– Statements
– Expressions
10 Integrated development
environment (IDE)
11 Installation
– Rum the setup file with administrator permission.
– Select the Language.
12 Installation…
– Next step Click Next.
13 Installation…
– Need to Accept the terms and
condition
– Then Click Next.
14 Installation…
– Have to Specify the Location.
– Can change the default location by
clicking “Browse” Button.
– Then Click Next.
15 Installation…
– Then Click Next.
16 Installation…
– Have to check that Desktop icon is
enabled or not.
– Then Click Next.
17 Installation…
– Then Click Install.
18 Installation…
– Finally Click Finish.
– Now you can use C-Free.
19 IDEs for C programming
– C-free 5
– Code::Blocks
– Eclipse
– CodeLite
– https://www.tecmint.com/best-linux-ide-editors-source-
code-editors/
20
21 Structure of C Program
#include <stdio.h>
Header file
main()
Main
{ function
C Statements and Functions;
}
Every
C Statements should end with a
semicolon (;).
22 Basic Program in C
#include <stdio.h>
int main()
{
printf(“My first Program");
return 0;
}
23 Basic Program in C cont…
– Then Save it as filename.c
(filename can be any name & .c is extension)
– Then Compile the program
– Then run it
24 int main()
– Program's execution starts from the main function
– Parenthesis used to indicate a function
– int means that main "returns" an integer value
– Braces ({ and }) indicate a block
– The bodies of all functions must be contained in braces
25 Note the followings
– C is a case sensitive programming language
– It means in C printf and Printf will have different meanings
– C has a free-form line structure. End of each C statement
must be marked with a semicolon
– Multiple statements can be on the same line
– White Spaces (ie tab space and space bar ) are ignored