Write a program that uses malloc to create space for storing 10 integers. Using a loop and
the pow function of the math library, fi ll up the space with values of 2 raised to the power n
where n varies from 1 to 10. Print the values.
Write a program that uses calloc to create a memory block for storing 10 integers.
Save the values of two integers at the end of the block with user input and print the contents
of the entire block using a loop. Could the output differ if malloc is used instead of calloc?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here