Professional Documents
Culture Documents
C. Programming Mid-Term Full New
C. Programming Mid-Term Full New
Programming
01
Mid-term
• Variable: A variable is
nothing but a name given
to a storage area that our
programs can manipulate.
Each variable in C has a
specific type, which
determines the size and
layout of the variable's
memory; the range of
values that can be stored
within that memory; and
the set of operations that
can be applied to the
variable.
Type of 03
Variable:
Variable
Numeric Categorical
• Integer: Integers
are whole numbers
that can have both
zero, positive and
negative values but no
decimal values. For
example, 0 , -5 , 10. We
can use int for
declaring an integer
variable. int id; Here,
id is a variable of type
integer.
Float: 10
• Float: Float is a
shortened term for
"floating point." By
definition, it's a
fundamental data type
built into the compiler
that's used to define
numeric values with
floating decimal
points. C, C++, C# and
many other
programming languages
recognize float as a
data type. Other
common data types
Double: 11
• Double: A double is a
data type in C
language that stores
high-precision floating-
point data or numbers
in computer memory.
It is called double data
type because it can
hold the double size of
data compared to the
float data type. A
double has 8 bytes,
which is equal to 64 bits
in size.
Return: 12
• Return: A return
statement ends the
execution of a function,
and returns control to
the calling function.
Execution resumes in
the calling function at
the point immediately
following the call. A
return statement can
return a value to the
calling function.
Semicolon(;): 13
• Semicolon(;):
Semicolons are end
statements in C. The
Semicolon tells that the
current statement has
been terminated and
other statements
following are new
statements.
For Practice:01 14
For Practice:02 15
For Practice:03 16
For Practice:04 17
For Practice:05 18
For Practice:06 19
For Practice:07 20
For Practice:08 21
For Practice:09 22
For Practice:10 23
For Practice:11 24
For Practice:12 25
For Practice:13 26
For Practice:14 27