floor and ceil
Welcome to my blog
.If you’re new here, you may want to subscribe to my full RSS feed. Thanks for visiting!
floor and ceil
floor and ceil functions comes under math.h header file.
floor is used to round down the value of the decimal number and ceil is used to round up the value of the [...]
Const data type
const data type
This lesser known data type is used to declare constants.The syntax is
const type name=value;
ex:
const int a=10;
is equivalent to
#define a 10
now consider this program
#include<stdio.h>
void main()
{
const int a=10;
printf(”%d”,a);
a=14;
printf(”%d”,a);
}
what do you think the ouput will be???
First off all the program will not compile itself because it is not allowed [...]
enum data type
enum data type:
it means enumerated type.
It’s a user defined datatype.It’s syntax is
enum name{value1,value2,…..valuen);
ex:enum week{sunday,monday,tuesday,wednesday,thursday,friday,saturday}
and afterwards to declare variables of enum type ‘name’
enum name variables;
ex:enum week a;
now after doing this we can directly assign the value of a as
ex:a=friday;
the value of a will be 4.Because the compiler will automatically assign the value 0 to sunday,1 to [...]
Edit Set
EditSet:
This will be great useful in strings.You can specify the characters you want to include or exclude in C.This will work with scanf.
Include set:
Ex:scanf(”%[a-z]“,a);
means it will read all the characters between a to z and if other character in encountered, it will stop reading the variable.
Ex:if the input is adithyaU, then the value of [...]

