0% found this document useful (0 votes)
17 views34 pages

Pop Module 1

Uploaded by

Pranitha byreddy
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 views34 pages

Pop Module 1

Uploaded by

Pranitha byreddy
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/ 34

Module 1

Principles of Programming (24POP13)

MAYURI K P
Email: [email protected]
phone: +91 8951489146
Basic Definitions of Programming

 Programming: The process of creating a set of instructions for a computer to perform specific tasks. This involves writing
code in a programming language.
 Programming Language: A formal language comprising a set of instructions that can be used to produce various kinds of
output. Examples include Python, Java, and C++.
 Algorithm: A step-by-step procedure or formula for solving a problem or performing a task.
 Code: The written instructions in a programming language that tell the computer what to do.
 Compiler: A program that translates code written in a high-level programming language into machine code, which can be
executed by a computer.
 Interpreter: A program that directly executes instructions written in a programming language without requiring them to be
compiled into machine code first.
 Debugging: The process of identifying and fixing errors or bugs in code.
 Variable: A storage location in a program that can hold data, which can be changed during program execution.
 Function: A reusable block of code that performs a specific task and can be called whenever needed.
 Syntax: The set of rules that defines the combinations of symbols and characters that are considered to be correctly structured
programs in a programming language.
h
0
The Standard Function Library in C is a huge library of sub-libraries, each of which contains the code for
several functions. In order to make use of these libraries, link each library in the broader library through the use
of header files.
C Tokens:
A token in C can be defined as the smallest individual element of the C programming language that is meaningful to the compiler.
C has 6 Different types of tokens. C programs are written using these tokens and syntax of the language.

1. C Token – Keywords:
Keywords are pre-defined or reserved words in a
programming language. Each keyword is meant to perform
a specific function in a program.
An array in C is a fixed-size collection of similar data items stored in contiguous
memory locations. It can be used to store the collection of primitive data types
such as int, char, float, etc.,
Float Data Type: In C programming float data type is used to
• Integer Data Type: The integer datatype in C is used to store the
store floating-point values. Float in C is used to store decimal
integer numbers(any number including positive, negative and
and exponential values. It is used to store decimal numbers
zero without decimal part). Octal values, hexadecimal values,
(numbers with floating point values)
and decimal values can be stored in int data type in C

• Double Data Type


A Double data type in C is used to store decimal numbers (numbers
with floating point values) with double precision. It is used to define
numeric values which hold numbers with decimal values in C.

• Character Data Type: Character data type allows its variable to


store only a single character. The size of the character is 1 byte. It is
the most basic data type in C.
• Void Data Type
Constants: It is a variable that cannot be modified once it is
declared in the program. We can not make any change in the
value of the constant variables after they are defined.
To print integer number in Hexadecimal format, "%x" or "%X" is
used as format specifier in printf() statement

You might also like