if your calculation involves a decimal point, u must use float, otherwise you can use integer for normal purpose.
for example,
if u want to divide some number, lets say 9/4 then u must use float to get the answer in accurate decimal point , otherwise if u use int there, the answer will be just 2 instead of 2.25
whenever we used an integer in the program we used int. if there is any decimal part in the number then we used float.
It is one of the built-in data-types, it can hold a floating point value.
Sure especially in programming. Generally an int can be passed directly into a float. Examples: 9 is an integer 9.00 is a float in programming int A = 9; Float B = A;
It is used with other data types such as long int or long float (=double). The capacity of the data types got increased with long keyword
same the types used in C. that is int...char...float...
Code for TRAPEZOIDAL RULE in C Programming#include #include #include void main() { float x[10],y[10],sum=0,h,temp; int i,n,j,k=0; float fact(int); clrscr(); printf("\nhow many record you will be enter: "); scanf("%d",&n); for(i=0; i
Identifiers are a bit more generic in the context of programming. If you mean, in terms of the C languages (C, C++, C#), the question is the reverse...keywords may NOT be used as identifiers. For example, you cannot use keywords such as "int", "float", "double", etc. as the names of variables or objects.
Sure especially in programming. Generally an int can be passed directly into a float. Examples: 9 is an integer 9.00 is a float in programming int A = 9; Float B = A;
It is used with other data types such as long int or long float (=double). The capacity of the data types got increased with long keyword
same the types used in C. that is int...char...float...
Code for TRAPEZOIDAL RULE in C Programming#include #include #include void main() { float x[10],y[10],sum=0,h,temp; int i,n,j,k=0; float fact(int); clrscr(); printf("\nhow many record you will be enter: "); scanf("%d",&n); for(i=0; i
float percent = ((float)CurrentItems / (float)MaxItems);
int* pint; // instantiate a pointer to an int. float* pflt; // instantiate a pointer to a float.
Identifiers are a bit more generic in the context of programming. If you mean, in terms of the C languages (C, C++, C#), the question is the reverse...keywords may NOT be used as identifiers. For example, you cannot use keywords such as "int", "float", "double", etc. as the names of variables or objects.
int,float char,double ,long int,unsined int lots of others..
A variable of which the value cannot change. Example of its usage: const int foo = 5;
prototyping is declaring the function , its returntype, type of argument passed so that the compiler just know what the function if not defined yet will be doing. eg:- int xyz(int,float); //this is the prototype main() { int x; x=xyz(4,3.55); printf("%d",x); } int xyz(int a, float b) // actual definition of function { int c; c=a + b; return c; }
int main() { int x = 40 + 2; }
The data types indicate the type of values that can be stored. The primary data types in c are:1. int, short, long, long long - used for integer values2. float, double - used for storing floating point numbers3. char - used for storing ASCII characters