c programming. PLS ANSWER ALL THANK U! refer to the following code segment to answer the questions. Each question is ind

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

c programming. PLS ANSWER ALL THANK U! refer to the following code segment to answer the questions. Each question is ind

Post by answerhappygod »

c programming. PLS ANSWER ALL THANK U!refer to the following code segment to answer the questions. Eachquestion is independent from each other.
#define MAX_A 50#define MAX_B 20
typedef double arr2D[MAX_A][MAX_B];typedef char string[MAX_B];typedef string arrWords[MAX_A];
void f1(double);void f2(double []);void f3(double [][MAX_B]);void f4(double *);void fA(char);void fB(char *);void fC(string);void fD( ________ );
intmain(){ arr2D aValues; /*assume aValues is allocated spacestarting at address 0030 (in decimal). */ string strA, strB; /* assume strA is allocatedspace at starting at address 8050 (in decimal). */ arrWords sentence; /* assume sentence is allocatedspace starting at address 9070 (in decimal). */ //Assume all variables are initialized withvalues.
// to be replaced with code or function call (inthe succeeding questions)
return 0;}
QUESTIONS
1. Assume function call below will replace the comment in themain(). What should be the actual parameter if we want to pass thetwentieth (20th) double value stored in aValues? The answer SHOULDuse array indexing notation. Remove all spaces from youranswer.
2. Assume function call below will replace the comment in themain(). What should be the actual parameter if we want to pass theaddress of the third character stored in strA? The answershould NOT use array indexing notation. Remove all spaces from youranswer.
3. Assume function call below will replace the comment in themain(). What should be the actual parameter if we want to pass thethird character stored in strA? The answer should NOT usearray indexing notation. Remove all spaces from your answer.
4. Assume function call below will replace the comment in themain(). What should be the actual parameter if we want topass the starting address of the fifth row of aValues? The answerSHOULD use array indexing notation. Remove all spaces fromyour answer.
5. Assume function call below will replace the comment in themain(). What should be the actual parameter if we want topass the starting address of aValues? Remove all spaces fromyour answer.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply