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
15 comments:
this has helped me a lot....
n i found dis rily useful....
realy very much useful thank you
great program..thanks..
a great effort. helped me a lot in my assignment. thanks.
simply awesome and dam helpful
i got segmentation fault... why?
Hi sa,
I think you are not using Turbo C compiler.
Code for all types of compilers
//CONCATENATION OF TWO STRINGS IN C PROGRAM
#include
int main(){
int i=0,j=0;
char str1[100],str2[100],str3[100];
puts("Enter first string");
gets(str1);
puts("Enter second string");
gets(str2);
printf("Before concatenation the strings are\n");
puts(str1);
puts(str2);
while(str1[j]){
str3[i++]=str1[j++];
}
j=0;
while(str2[j]){
str3[i++]=str2[j++];
}
str3[i]='\0';
printf("After concatenation the strings are\n");
puts(str3);
return 0;
}
#include
#include
void main()
{
char s1[20],s2[20],si;
char*ps1,*ps2;
clrscr();
cout<<"enter 1 st";
cin>>s1;
cout<<"enter 2 nd";
cin>>s2;
ps1=&s1;
ps2=&s2;
while(ps1!='\0')
{
*ps1=*ps2;
ps1++;
ps2++;
}
*ps1='\0';
cout<<"copied string is";<<si;
}
THANK YOU SOO MUCH
how can we write a program to read and display a 3*3 matrix using array of pointer in c? reply me today only as tomorrow is my paper.
how can we write a program read and display a 3*3 matrix using pointer to an array in c?
It is wrong because how it possible to modify the string present in code section?/???
#include
#include
void concat(char *s1, char *s2)
{
char s3[100];char*p=s3;
while(*s1!='\0')
{
*p=*s1;
p++;
s1++;
}
while(*s2!='\0')
{
*p=*s2;
p++;
s2++;
}
*p='\0';
puts(s3);
}
int main()
{
char s1[50],s2[50];
gets(s1);
gets(s2);
concat(s1,s2);
return 0;
}
it will work in all the condition
u don't need to declare int j=0;
it will generate a warning...
Very very Good example
Post a Comment