Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(a) (i) Write the output of the following C program: I> #include 2> char func(int, char); 3> int a 40, B-50; 4> int main) 5>
(a) (i) Write the output of the following C program: I> #include 2> char func(int, char); 3> int a 40, B-50; 4> int main) 5> 6 int a-38, b-48 7char ch; 8> ch-func(a,b) 9> printf("%c, %d",ch,ch); 10> return 0; 12> char func(int a, char B) 14 return a + B (ii) Write the output of the C program in part (i) following the changes made as given below. The changes made are highlighted in Bold 2> int func(int,char); 12> int func(int B, char a) (8 Marks) (b) What is the definition of a function in C? (4 Marks) (c What are the advantages of using functions and modular design in programming (5 Marks) (d) (i) Write the output of the following C program #include #define TEN 10 int main char str[ ]:"Happy". int i, num-TEN for(i=0;i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started