3. Write a c program to delete the all consonants from given string.
9. Write a c program to print the string from given character.
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c
16 comments:
nice..but not dealt with lexicographic type sorting
nice but try to use without built-in function
In this program type mismatch error occur.....whats the reason...how to prevent it..??
#include"string.h"
#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
//char string1[],string2[];
char string1[]= "Goodhell0";
char string2[]= "Morning";
char string3[17];
//merge two strings
strcat(string3,string1);
strcat(string3 ,string2);
printf("%s",string3);
//sort two string
char min[1],next[1];
int loc=0;
int len = strlen(string3);
//printf("%d",len);
//int minchar , nextchar;
for(int i=0;i < len;i++)
{
loc = i;
min[0] =(char)string3[loc];
for(int j=i;j < len;j++)
{
next[0]=(char)string3[j];
if(int(min[0]) > int(next[0]))
{
min[0] =next[0];
loc = j;
}
}
string3[loc] = string3[i];
string3[i] = min[0];
//printf("\n %s", min);
}
printf("\n %s",string3);
getch();
}
put #include
good
use char str[20] instead of str[20][20]
why you use str[20][20] and not str[20] only?
GOOD APPROACH...PLZZ....TO TAKE A INPUT..AND SHOW THE OUT PUT ALSO....WHICH CLEAR THE ALL SCENARIO....
Nice one
put #include
string
put #include
what to declare temp ? an int or char ? because both definitions are showing error
I think it's not clear... approach
Post a Comment