Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Write a C program to read 1D array and define a function that accepts this input 1D array and its size. In the function
a) Write a C program to read 1D array and define a function that accepts this input 1D array and its size. In the function definition merge the adjacent array elements and display the resultant numbers. Sample I/O Input 1D array: 12 13 15 6 7 8 Output: 1213 1315 156 67 78 b) Give the output of the following snippets. Justify your answer. i. int z = 270; float fu = 58.89; int *ptr=&z; float *ptr2= &fu; printf("%d ", *(&z)); printf("%f ", ptr2); ii. int no, sno, *ptr, *ptr2, m=0; scanf("%d%d", &no, &sno); ptr = &no; ptr2 =&sno; if(*ptr>*ptr2) printf("%d",m); else printf("%d",m++)
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