forked from malep2007/C-Programming-Assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQUESTION 2
More file actions
43 lines (35 loc) · 876 Bytes
/
QUESTION 2
File metadata and controls
43 lines (35 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*QUESTION 2 PART 1*/
//do_it.h DECLARATION
float do_it(char x, char y, char z);
do_it.c
#include<stdio.h>
#include<stdlib.h>
#include"do_it.h"
float do_it(char x, char y,char z) //DEFINING A FUNCTION
{
statements--------
}
/*QUESTION 2 PART 2*/
//print_a_number.h declaration
void print_a_number(int a);
print_a_number.c
#include<stdio.h>
#include<stdlib.h>
#include"print_a_number.h"
void print_a_number(int a)//DEFINING A FUNCTION
{
statements---------
}
/*QUESTION TWO PART 3*/
#include<stdio.h>
voidprint_msg( void );
main()//FOR "MAIN" TO RETURN 0 IT SHOULD BE DECLARED AS "int main""
{
print_msg("This is a message to print");/*THIS SHOULD NOT BE WITH ANY ARGUMENTS IN THE BRACKETS*/
return 0;
}
voidprint_msq( void )//THE WORD msg IS WRONGLY SPELLED
{
puts("This is a message to print");
return 0;
}