Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me with my computer science homework. Correct answers will get a thumbs up! Pointers and arrays. Int a[3] = (1, 2,

Can someone please help me with my computer science homework. Correct answers will get a thumbs up!

image text in transcribed

Pointers and arrays. Int a[3] = (1, 2, 3); Draw a diagram of memory for the variable a and the array elements. Complete the following pseudocode. Function name: append input: str1, str2: two pointers to strings (i.e., char * str1, *str2) output: nothing. side effect: the string in str1 becomes the original string in str1 appended with the string in str2. Data//put auxiliary data needed here ... ... Plan//fill the plan below ... ... Write a C function display. The input of the function is a file name. The function has no output. The side effect of the function prints the content of the file in the following form: The value of each of the first 10 bytes of the file are printed in 16-base form in the first row of the Bytes column. The first 10 bytes are printed as characters, when they are display able, in the first row of the characters column. If a byte does not represent a displayable character (as a character) should be printed as '.' Function isprint can be used to check if a byte is displayable. Google "isprint C" to find the specification of the function. Note that the value of the first byte in the example file is 0 times 23. The character represented by that byte is 'theta'. The 0 in the offset column is the position of the first byte of the 10 bytes. So, in the second row, we print next 10 bytes (as values and characters) starting from the position of 10. We repeat this process until all bytes in the given file is printed. The input file may be a binary file. Write a C function copy. The inputs of the function are two file names fN1 and fN2. This function has no output. The side effect of the function is that the content of file with name of fN2 is the same as that of fN1

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions