What Is A Symbolic Constant ?
What Is A Symbolic Constant ?
Asymbolic constantisan"variable"whosevaluedoesnot
changeduringtheentirelifetimeoftheprogram...
Theyareusuallydefinedatthebeginningoftheprogram.
SomeconstantsinMathematics:
3.1415926535...
#include<stdio.h>
#include<conio.h>
#defineTRUE1
#definePI3.141593
voidmain()
{
floata;
floatb;
floatc;
floatd=PI;
clrscr();
if(TRUE)
{
a=100;
b=a*10;
c=b-a;
}
printf("\na=%f\nb=%f\nc=%f\nPI=%f",a,b,c,d);
getch();
}
printf(control string,arg1,arg2,arg3.argn);
Control string specifies the field specifications consisting of
the % symbol, data type, and an optional number specifying the
field width. It also includes blanks, tabs, new lines.
Conversion specifications for scanf
a) The field specification for reading an integer number is
%wd where w stands for the width. This width should be large
enough to obtain the input data size.
b) Input items are separated by spaces or tabs and the
format specifications should match the arguments in order.
printf(%s %s,b,a);