+ 1
How to use a loop to write program code to
2. Searching to search for a specific letter (int k). 3. Frequency: to count the frequency of k. In this program: #include <stdio.h> #include<string.h> char merge(char a[], char b[]); // int search(const char c[]); // void frequency(const char c, char k); int main() { char firstName[] = "hessah"; char lastName[]= "alrashidi"; char fullName[50]; int n=0; for(int i=0; i<(int)strlen(firstName); i++,n++) fullName[n] =firstName[i]; fullName[n++] = ' '; for(int i=0; i<(int)strlen(lastName); i++,n++) fullName[n] = lastName[i]; fullName[n] = '\0'; for(int i=0; i<(int)strlen(fullName); i++) printf("%c",fullName[i]); return 0; }
3 Réponses
+ 4
+ 1
I know but how to use the array function with this programming code
+ 1
Can you give me an example of this program? and Thank you