Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output of following programs? Briefly explain your answer. 1. Program 1: # include void foo (int x) double a-100 double b-40; x-

What is the output of following programs? Briefly explain your answer.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

1. Program 1: # include void foo (int x) double a-100 double b-40; x- a*a int main int y= 20 foo (y); printf("%d", y); return 0; 2. Program 2: # include void foo (int *ptr) double a 10; double b-4; ptraa +4*b+5; imt main ( int y-20 foo(&y) printf("%d", y); return 0 3. Program 3: #include stdio.h int main double *ptr; double x; ptr&x; *ptr = 10.254575; printf(* printf(* x %0.2f ", *ptr=%f ', x); *ptr ) ; *ptr 10; printf(* x = %f , x); printf(* *ptr=%f ', *ptr ) ; (*ptr)++; printf(* x %0.4f ", x); printf(* *ptr= %0.4f ', *ptr); return 0; 4. Program 4: #include void foo (int *p, int *q) int int a=10; b-; *pbb+10*a; int i = 0, j int main () 2 foo(&i , &j); printf("%d %d ", i, j); getchar (O; return 0; 5. Program 5: #include

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago

Question

Differentiate between hard and soft measures of service quality.

Answered: 1 week ago