answersLogoWhite

0


Best Answer

write a scripting to return values in functions

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write function integerpower that return the value of base exponent?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program to return a function using class in C Plus Plus?

Classes cannot return values, only functions can return values. But you cannot return a function from a function, you can only return a function pointer -- a pointer variable holding the address of the function you wish to return. All possible return values must be of the same type, therefore all function signatures and return types must be exactly the same -- only the name of the functions can differ.


D Write a function that returns 2n where n is an input parameter?

int 2n(int n){return n << 1;)


Can you write a program without defining the function prototype?

Sure: int main (void) { puts ("Hello, world"); return 0; }


What is drawback of writing the definitions of all the functions before main function?

If you write out the functions before you write main, you will probably have to return to the functions after outlining main and correct them so that they interact with main as they should. In the long run, it is far better to write main first, so that you understand exactly what you want each function to do before you write the function, so that you don't have to go back and correct them.


Why do you have to use the return type for the main function in c language i mean to what does the main function have to return the value to?

It returns the value to the operating system or whatever process launched it. If you launched your program from a batch file then the batch file can detect this return value. If your program is spawned or launched by another program then the return value goes to that parent prgoram or process. One more thing is that you can write main() without the return type and it will be absolutely correct

Related questions

Write a program to return a function using class in C Plus Plus?

Classes cannot return values, only functions can return values. But you cannot return a function from a function, you can only return a function pointer -- a pointer variable holding the address of the function you wish to return. All possible return values must be of the same type, therefore all function signatures and return types must be exactly the same -- only the name of the functions can differ.


Write a c program for function with no arguments and no return values?

void mynullfunction () {;}


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.


How do you write 1296 as a Exponent?

64


How do you write exponent in laptop?

To write an exponent on a laptop you would use the "^" key. For example, "3^2" would be "three squared."


Who you write 9 cubes in exponent form?

9 cubes in exponent form = 93


How do you write a c program to calculate pow x n?

1) Write a loop to multiply "x" by itself, "n" times. 2) Use recursion. If your function is called "myPower", then if the exponent is 1, return "x". Otherwise return myPower(x, n - 1). 3) But in general, and especially if you want to calculate non-integral powers, it's best to use the functions already included in the C language.


How can you write 111 as a exponent?

1.11 × 102


How do you write 22 as an exponent?

2.2*101


How do you write 10000 by using an exponent?

104


How do you write 10 in exponent form?

101


Write 0.001 as a fraction and a number exponent with a exponent?

One-thousandth, 1 x 10-3