Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9. (20 pts.) Pointers onsider the following lines of code: int al3]I4] K10, 20, 30, 40 (5, 10, 15, 20, printf(The sum is %d ,

image text in transcribed

9. (20 pts.) Pointers onsider the following lines of code: int al3]I4] K10, 20, 30, 40 (5, 10, 15, 20, printf("The sum is %d ", sumit((int *)a, 3, 4)); , write the function the number of rows and cols of the 2D array, respectively, and returns the sumit that receives a pointer to a 3 x 4- 2D array of integers, and 2 integers representing sum of the values in this array. You brackets use ingle loop (which type is your choice) AND you CANNOT use any indesing, Le. can'tuse square (I 1): 10. (20 pts.) The strcpy function receives two pointers to strings of characters: a destination (thought to be an array of char but could be allocated memory) and a source. strcpy copies the source into the destination Also, it returns a pointer to the destination. The destination must contain enough bytes to hold the entire source string plus the null terminating character (strcpy does not check for this!). This is a function of which you should already be familiar. Using only pointers (as the actual function does), write strcpy here: (strcpy(dest, src)

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 Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

sharing of non-material benefits such as time and affection;

Answered: 1 week ago