Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1) What will the output of the following program be? #include int main() f int a- 42, b -16 int *p, *q; p =

image text in transcribed

image text in transcribed

Question 1) What will the output of the following program be? #include int main() f int a- 42, b -16 int *p, *q; p = &a; q&b; q*p; P - q; printf("%d %d %d %d ", a,b,*p,*q); Question 2) Write a function called swap to exchange two integers by reference. The main function is provided. int main) int a 42; int b 16; printf("%d, swap (&a printf("%d, return 0; %d ", a, b); , &b); %d ", a, b); Question 3) char name[100]; int age, gnum; double gpa; scanf("%s %d/%d %lf", name , &age, &gnum, &gpa); printf("%s %d/%d %1f ", name, age, gnun, gpa); What will be printed out with each of the following inputs? Kevin 73/123456 3.92 Kevin 73 123456 3.92

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

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

Why could the Robert Bosch approach make sense to the company?

Answered: 1 week ago