Methodological Instructions
Theme: String manipulation 2 lesson
Objective: 10.4.1.2 use procedures and functions for string manipulation
Assessment criteria
· can define string data; String and char;
· uses string functions to solve problems
· applies string procedures to solve problems
Basic Level:
Previous 1 lesson of this topic
Key words and phrases:
Use of appropriate subject specific terminology on the topic in the study of new content
String, processing strings, insert substring, delete symbols, string length determination, copying symbols, determining the position.
The function differs from the procedure in that the procedure..., while the function....
In order to determine the length of a string...
To insert a substring in a string, we apply…
I. Practical tasks
A. Write a C program to count total number of words in a string using loop. How to find total number of words in a given string using loops in C programming. Logic to count total number of words in a string.
Example
Input
Input string: I love programming
Output
Total number of words: 3
B. Write a C program to find reverse of a given string using loop. How to find reverse of any given string using loop in C programming. Logic to find reverse of a string without using strrev() function in C. C program to reverse a string using strrev() string function.
Example
Input
Output
Reverse string: olleH
C. Write a C program to input any string from user and reverse the order of words. How to reverse the order of words in a given string using C programming. Logic to reverse the order of words in a sentence using C program.
Example
Input
Input string : I love learning programming
Output
Reversed order of words:
programming learning love I
Visual Aids and Materials.
1. Slides
2. Procedures and functions of working with strings: http://pas1.ru/stringfunction
3. http://purecodecpp.com/archives/920
4. http://cs.stmarys.ca/~porter/csc/ref/c_cpp_strings.html
5. https://www.w3resource.com/cpp-exercises/basic/index.php
6. https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1132/handouts/08-C++-Strings.pdf
7. https://cal-linux.com/tutorials/strings.html
8. https://www.cs.fsu.edu/~myers/cop3014/hw/hwpractice.html
9. Theory https://codeforwin.org/2015/11/string-programming-exercises-and-solutions-in-c.html
10. https://www.programiz.com/cpp-programming/strings
11. Скачано с www.znanio.ru
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.