Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Functions in C Language

Rating
-
Sold
-
Pages
23
Uploaded on
18-07-2025
Written in
2024/2025

I have written by my self only and teach in class. I written in very simple language, that's it is very easy to learn. I have written theory with syntax followed by examples. Try at least one, surely, you will understand easily.

Show more Read less
Institution
Course

Content preview

Program:
Program is the set of instructions which is run by the computer to perform specific task.
The task of developing program is called programming.

Problem Solving Technique:
Sometimes it is not sufficient just to cope with problems. We have to solve that
problems. Most people are involving to solve the problem. These problem are occur
while performing small task or making small decision. So, Here are the some basic
steps to solve the problems

Step 1: Identify and Define Problem

Explain you problem clearly as possible as you can.

Step 2: Generate Possible Solutions

 List out all the solution that you find. Don’t focus on the quality of the solution

 Generate the maximum number of solution as you can without considering the quality of
the solution

Step 3: Evaluate Alternatives

After generating the maximum solution, Remove the undesired solutions.

Step 4: Decide a Solution

After filtering all the solution, you have the best solution only. Then choose on of the
best solution and make a decision to make it as a perfect solution.

Step 5: Implement a Solution:

After getting the best solution, Implement that solution to solve a problem.

Step 6: Evaluate the result

After implementing a best solution, Evaluate how much you solution solve the problem.
If your solution will not solve the problem then you can again start with Step 2.

,Algorithm:
Algorithm is the set of rules that define how particular problem can be solved in finite
number of steps. Any good algorithm must have following characteristics

1. Input: Specify and require input
2. Output: Solution of any problem
3. Definite: Solution must be clearly defined
4. Effective
5. Finite: Steps must be finite
6. Correct: Correct output must be generated

Advantages of Algorithms:

1. It is the way to sole a problem step-wise so it is easy to understand.
2. It uses definite procedure.
3. It is not dependent with any programming language.
4. Each step has it own meaning so it is easy to debug

Disadvantage of Algorithms:

1. It is time consuming
2. Difficult to show branching and looping statement
3. Large problems are difficult to implement




Flowchart:
The solution of any problem in picture form is called flowchart. It is the one of the most
important technique to depict an algorithm.

Advantage of Flowchart:

1. Easier to understand
2. Helps to understand logic of problem
3. Easy to draw flowchart in any software like MS-Word
4. Complex problem can be represent using less symbols
5. It is the way to documenting any problem
6. Helps in debugging process

Disadvantage of Flowchart:

1. For any change, Flowchart have to redrawn

, 2. Showing many looping and branching become complex
3. Modification of flowchart is time consuming




Symbol Used in Flowchart:




Example: Algorithm and Flowchart to check odd or even

Algorithm:

Step 1: Start
Step 2: Declare a variable x
Step 3: Take a input from user and store in x
Step 4: IF x % 2 == 0 THEN
PRINT Even
ELSE
PRINT Odd
Step 5: End

Written for

Institution
Course

Document information

Uploaded on
July 18, 2025
Number of pages
23
Written in
2024/2025
Type
Class notes
Professor(s)
Self
Contains
All classes

Subjects

$4.79
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
NaseeMirza

Also available in package deal

Get to know the seller

Seller avatar
NaseeMirza Freelancer
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
9 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions