Task | Comment | Grade |
---|---|---|
Practically (i.e., with code examples) explain the theory from the first part of this lesson, where the concept of two sizes of an array is discussed. Demonstrate how to make it look like the array size can be increased/decreased. All loops should work with the array size stored in the size variable. Keep the physical, actual size in the constant N. | 3/3 | |
Declare a string variable (store any sentence in the array). Task: reverse the string, i.e., write it backward. For example: char s[]="ABCDEF";.....your code.....cout<<s; => FEDCBA | 1/1 | |
Swap neighboring letters char s[]="ABCDEF";.....your code.....cout<<s; => BADCFE | 1/1 | |
Shift the string cyclically to the left (it’s easier to start with this), then cyclically to the right. char s[]="ABCDEF", x[]="abrakadabra";.....your code.....cout<<s<<"\n"<<x; => BCDEFA aabrakadabr | 1.5/1.5 | |
Remove all vowel letters char s[]="this is some text";...your code...cout<<s; => ths s sm txt | 1.5/1.5 | |
Double each vowel letter char s[]="this is some text";...your code...cout<<s; => thiis iis soomee teext | 2/2 | |
аAdditional task (1-2 points) - as a replacement for any of the tasks 2-6: Choose any number, preferably slightly larger than the length of the text. Increase the text length to the specified number by adding spaces between words. char s[]="this is some text";...your code...cout<s<ss; => (this is some text) len of s => 17 number =27 | + | |
Total: I would like to add some comment - but I have nothing to say))) | 10/10 |
RE: SLC21 Week3 - Strings in C
You are viewing a single comment's thread from:
SLC21 Week3 - Strings in C