Going to fail class tomorrow and get kicked out of Uni i am a business major but have been allowed to do a class in C as i felt it would be useful however i just dont get it can do question A but nothing else. I know this must be annoying to ask but can someone just help me once so i can stay in University and then i will read and read and read to pass the next assignment by myself.
Instructions: -Answer all (3) questions.
-Functions in (2) and (3) must be part of complete C programs.
1] Write C programs to do the following:
a) A program to create a file and to store the message “Hello, world” in the file.
b) A program to open the file you created in (a) and to append a new line of text which
says, “Files are fun.”
c)A program which reads the file in (a) and (b) and displays its contents.
2 ]Write a C function xyz which takes two floats as input and which rounds them to
their nearest respective whole numbers:
xyz 3.1 2.9 ==> 3.0 3.0
xyz 5.5 1.2 ==> 6.0 1.0
xyz 9.0 0.5 ==> 9.0 1.0
The arguments to xyz MIST be passed by reference.
3] Write a RECURSIVE C function p3 which takes a number as input and which returns
true if the number is power 3, false otherwise.
Note: the function MJUST be recursive to get credit for the question.