Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Questions: What is the output of the following programs? Explain each print statement 1) #include #include int count; void fun1(void); void fun2(void); void main() {

image text in transcribed

Questions: What is the output of the following programs? Explain each print statement 1) #include #include int count; void fun1(void); void fun2(void); void main() { int count = 7; printf("inside main before calling fun1() count is %d ", count); fun1(); count=8; printf("inside main after calling fun1() count is %d ", count); } void fun1(void) { int count = 11; printf("inside fun1 before calling fun2() count is %d ", count); fun2(); printf("inside fun1 after calling fun2() count is %d ", count); } void fun2(void) { for(count=3; count int myFunc(int arg); int main(void) { int x = 5; printf("Before calling the function the value of x is %d ", x); x=myFunc(x); printf("After calling the function the value of x is %d ",x); } int myFunc(int arg){ arg = 4; printf("The value of arg in the myFunc is %d ", arg); return(arg); } 3) #include void myFunc(int arg); int x = 12; int main(void) { int x = 5; printf("Before calling the function the value of x is %d ",x); myFunc(x); printf("After calling the function the value of x is %d ", x); } void myFunc(int arg) { arg = 4; printf("The value of arg in the myFunc is %d ", arg); }

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

Step: 3

blur-text-image

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

11. List at least five words that might affect readers negatively.

Answered: 1 week ago