#include <stdio.h> #include <conio.h>
main ( )
int a=15; int b;
printf (“This is C Language”); printf (“%d”,a); print(“%d”,b);
Format Specifier should be same to the type of variable for printing.
|%d||Singed Decimal Integer|
|%e||Floating Point (Exponential Notation)|
|%g||Floating Point (%f or %e)|
|%u||Unsigned Decimal Integer|
FIELD WIDTH SPECIFIRER or ESCAPE SEQUENCES:
- Special characters are used to control printing on the output device are called Escape Sequence.
- Escape Sequence is a combination of a Backslash ‘\’ and a code character.
|\n||For New Line|
|\a||For Alarm (Beep)|
|\r||Cursor will move to the beginning of line|
|\’||To Print Single Quote|
|\”||To Print Double Quote|
\\ To Print Backslash
- Expression is used for calculating the value of a formula.
- It has different Operands and Operators.
- Its evaluation gives a single value.
(e.g.) A × B × C
– Where A, B, C are variable names and are called operands.
– Multiplication sign ‘×’ is called operator.