C Basics

Escape Sequence

User Rating:  / 2

Escape Sequence

 

There are certain characters in C when they are proceeded by a back slash they will have special meaning.

 

Following is the example to show few escape sequence characters:

 

Esc. Seq

    Description

  Esc. Seq

Description

\n

New Line

\t

Tab

\b

Backspace

\r

Carriage Return

\f

Form feed

\a

Alert

\’

Single Quote

\”

Double Quote

\\

Backslash

\v

Vertical Tab

 

Add a comment

Read more...

C OPERATORS

User Rating:  / 2

An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C language is rich in built-in operators and provides following type of operators:

  •  Arithmetic Operators
  •  Relational Operators
  •  Logical Operators
  •  Bitwise Operators
  •  Assignment Operators
  •  Misc Operators

 

We will cover each one of above in detail.

 

1) Arithmetic Operators

Operator

Description

+

Adds two operands

-

Subtracts second operand from the first

*

Multiply both operands

/

Divide numerator by de-numerator

%

Modulus Operator and remainder of after an integer division

++

Increment operator increases integer value by one

--

Decrement operator decreases integer value by one

 

Add a comment

Read more...

C STORAGE CLASS

User Rating:  / 2

To fully define variable one needs to mention not only its ‘type’ but also storage class. A storage class defines the scope (visibility) and life time of variables and/or functions within a C Program. These specifiers precede the type that they modify.

From C compiler’s point of view, a variable name identifies some physical location within the computer where the string of bits representing the variable’s value is stored. There are basically two kinds of locations in a computer where such a value may be kept— Memory and CPU registers. It is the variable’s storage class that determines in which of these two locations the value is stored.

Variable’s storage class tell us about: -

  • Where the variable would be stored.
  • What will be the initial value of the variable, if initial value is not specifically assigned.(i.e. the default initial value).
  • What is the scope of the variable; i.e. in which functions the value of the variable would be available.
  • What is the life of the variable; i.e. how long would the variable exist.
Add a comment

Read more...

                                                                                          About Us  ||  Contact Us  ||  Terms & Conditions  ||  Privacy Policy 

Referral Banners