Anda di halaman 1dari 2

Mock Assignment 4 - C Programming/Functions and Pointers

Exercise 1
Write a C program that keeps asking the user for a number and a power and computes the result until the
user enters a character to stop the program. You should handle all possible cases for the number and the
power, and use the following function header: double Power(int N, int P).

Exercise 2
Write a C program that takes 4 letters from the alphabets, orders them from the smallest to the biggest and
display the next alphabets for each letter. Use the following function header:
void ManipulateAlphabets(char *C1, char *C2, char *C3, char *C4);
assume that all inputs are upper case, and you should print the next alphabets in the main function!
Do not handle any exceptions.
Example:
Enter your 4 alphabets: A Y K N
Alphabets ordered: A K N Y, and next alphabets are: B L O Z.

Anda mungkin juga menyukai