Answered step by step
Verified Expert Solution
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 =
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
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