answersLogoWhite

0


Best Answer

#include <stdio.h>

int findcube(int); // prototype

int main()

{

int a,b;

printf("Enter a number: ");

scanf("%d",&a);

b=findcube(a);

printf("The cube of %d is %d\n",a,b);

}

int findcube(int x)

{

return x*x*x;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write aprogram in c to calculate the cube of given integer number using function prototype?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you write a program without specifying the prototype of any function?

You can write a program without specifying its prototype when the function returns an integer.If the prototype is not mentioned the compiler thinks that the return type of the function used is integer.When making program which return integer you can ignore writing the protoype.


Write a function prototype named test that accepts two parameters an integer and character and returns a float?

float test(int, char);


Write the prototype of a function' divide' that takes two integer values and returns the quotient of double type.?

Your question isn't a question, but here is the answer: double divide (int p, int q);


Is the greatest integer function a continuous funcion?

No. It has a discontinuity at every integer value.


How do you print size of integer?

the size of an integer is determaind by using the function "sizeof(c)",here 'c' is any integer.


What is the greatest integer function of -50.95?

-51


How many bits need to represent decimal number 12500?

If you want an unsigned integer, you can calculate this as log2(12500), rounded up. You can calculate the log2 function (logarithm to the base 2), in this case, by dividing ln(12500) / ln(2).


How do declare function pointer having two integer parameters and returning integer pointers?

// declare a function int* function(int, int); or int* (function)(int, int); // declare a pointer to a function int* (*pointer_to_function)(int, int);


Why you use 'integer' before function in C language?

To specify the return-type of the function.


What is a function used to convert ASCII to integer?

atoi


The greatest integer function and absolute value function are both examples of functions that can be defined as what?

Both the Greatest Integer Function and the Absolute Value Function are considered Piece-Wise Defined Functions. This implies that the function was put together using parts from other functions.


How do you calculate an angle using the tangent?

You cannot calculate the angle using tangent: you need to use the inverse function: arctangent. The answer will be an angle, x, in the principal range (-90, 90) degrees. But it could be any (x + 180*k) for any integer k.