Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
368Activity
0 of .
Results for:
No results containing your search query
P. 1
Some Important programs on Strings(in C)

Some Important programs on Strings(in C)

Ratings:

5.0

(3)
|Views: 58,907|Likes:
Published by Anik
About 25 basic programs on strings in C language
About 25 basic programs on strings in C language

More info:

Published by: Anik on Apr 08, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

10/12/2014

pdf

text

original

 
String Questions :1. Program to Accept a String and displayUsing Functions/Arrays and Pointers 2. Program to Accept a String and display in Reverse3. Program to Accept a String and display its alternate characters4. Program to Accept a String and display Alternate characters in either case5. Program to Accept a String and display its substring(Accept parameters fromuser)ex. substr(str,start_pos,no_of_chars)6. Program to Accept a String and display its alternate characters in reverse7. Program to Accept 2 strings and display the largest string8. Program to Accept 2 strings and display combination of two strings9. Program to Accept a String and display vowels10. Program to Accept a String and display no of vowels11. Program to Accept a String and display no of each Vowel12. Program to Accept a String and a character and find out whether this characteris present in the string13. Program to Accept a String and a Character and find out whether this characteris present in the string.If Present then display how many times this Character occurs14. Accept 2 strings and check whether all Characters from 1st string are presentin 2nd String15. Accept 2 strings and display how many times each character from 1st stringoccurs in 2nd string16. Accept 2 strings and display the largset string17. Accept 2 strings and extract substring from both the strings(Accept argumentsfrom user)Create 3rd string which will be substring1+substring218. Accept String from user and copy it to another string(strcpy)19. Accept 2 strings and create third string which will be concatenation of 2stringsex : string3 = string1 + string220. Accept Multiple strings from user and display21. Accept Multiple strings from user and display odd positioned strings22. Accept Multiple strings and display even positioned strings in reverse23. Accept Multiple strings and display alternate strings in reverse
 
24. Accept Multiple strings and display alternate characters of alternate stringsin either case25. Accept Multiple strings and display combination of every two strings*------------------------*----------------------------*-----------------------*------------------------------*-------------------->>>>>>1) /*program to accept a string & display*/#include<stdio.h>#include<conio.h>char string(char str2[10]);void main(){int i;char str1[10];clrscr();printf("\n\nEnter the string\t");for(i=0;i<=9;i++){scanf("%c",&str1[i]);}string(str1);getch();}char string(char str2[10]){int j;printf("\n\nThe string is\t");for(j=0;j<=9;j++){printf("%c",str2[j]);}return 1;}________________________________________________________>>>>>>>>2)/* Program to accept a string and display in reverseusing functions/arrays and pointers */#include<stdio.h>#include<conio.h>#include<string.h>char reverse(char *p);void main(){int i;char str[10];clrscr();printf("\n\nEnter the String\t");gets(str);reverse(str);getch();}
 
char reverse(char *p){int j,l;l=strlen(p);printf("\n\nString in reverse is \t");for(j=l-1;j>=0;j--){printf("%c",p[j]);}return 1;}_________________________________________________________>>>>>>>3)/* Program to accept a string and display its alternate characters */#include<stdio.h>#include<conio.h>#include<string.h>char alt(char *p);void main(){char str[10];clrscr();printf("\n\nEnter the string\t");gets(str);alt(str);getch();}char alt(char *p){int j,l;l=strlen(p);printf("\n\nAlternate characters of the entered string are\t");for(j=0;j<=l-1;j=j+2){printf("%c",p[j]);}return 1;}______________________________________________________________>>>>>>4)/*Program to accept a string and display alternate characters in either case*/#include<stdio.h>#include<conio.h>#include<string.h>char altcase(char *p);void main(){char str[20];clrscr();printf("\n\nEnter the string\t");gets(str);altcase(str);

Activity (368)

You've already reviewed this. Edit your review.
1 hundred thousand reads
sandeep552 liked this
Sehreen Moorat liked this
Rajendra Malya liked this
Sowmeeth Sai added this note
tq
CHANDRA BHUSHAN liked this
Bijay Mishra liked this
Chandrika Nani liked this
Chandrika Nani liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->