Question: Considering the string statements below and assuming s1, s2 and s3 have been defined as strings (i.e., char [20]), answer questions a to c: (i)

Considering the string statements below and assuming s1, s2 and s3 have been defined as strings (i.e., char [20]), answer questions a to c:

(i) s1=strlen(s2); (ii) s3=s2*s1; (iii) printf(%s, s2); (iv) s2[4]=s3[5]; (v) s2=AmIcorrect?;

a. Which statements are not syntactically correct? Why?

b Which statement(s) returns the size of a string?

c. Which statement(s) copy a part of a string to another?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!