Question

Void Message { char sz_all=Well Come To KSU: char* psz_x; uint i = 1; psz x=&sz a[0]; while (psz_x !0) { *psz = *sz +i; i=
3-For the following C code 1- What port is used for switches 2- Draw the circuit diagram used with this code 3- How many coun
0 0
Add a comment Improve this question Transcribed image text
Answer #1

2.There is some syntax error in the code if you remove that error like in place of psz it should be psz_x and sz a it should be sz_a.

(1) If you correct them then the method Message is doing left shifting of the character in the character array and storing to psz_x.While loop will be continues till the end of the character array .

First psz_x point to the 0th character of the sz_a

And in while loop it will goes to next character till the last character.

(2)Array will store "elcome to ksu" after the final execution. As psu_x assigning one character next from the array sz_a.

If you have any doubt, please ask me in comment box. Thanks!

Add a comment
Know the answer?
Add Answer to:
Void Message { char sz_all="Well Come To KSU": char* psz_x; uint i = 1; psz x=&sz...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT