Answered step by step
Verified Expert Solution
Link Copied!

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>

image text in transcribed

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions