C
Programming and Technical
Programming
Program
Given a string. Write a program to form a string with first character of all words
Read Solution (Total 7)
-
- #include
int main()
{
char *str1;
int i;
printf("Enter any string::");
gets(str1);
for(i=0;str1[i];i++)
{
if(i==0)
printf("%c",str1[i]);
if(str1[i]==)
printf("%c",str1[i+1]);
}
}
I/P Madurai Kamaraj University
O/P MKU - 10 years agoHelpfull: Yes(2) No(2)
- Example:- "Iron Man is Tony Stark"
Output :- IMiTS
puts marker for every whitspace and then pick the words following the ends of markers.
Iron$Man$is$Tony$Stark
or if the sentence has more than one white spaces this technique will work
Ex:- Iron Man is Tony Stark
Iron$$$$$Man$is$$$$Tony$$Stark - 10 years agoHelpfull: Yes(1) No(1)
- please any one write the program for this
- 10 years agoHelpfull: Yes(1) No(0)
#include
#include
int main()
{
int i,j=0,m=0;
char orgname[50],abrevname[10];
printf("Enter The Organisation Name:");
gets(orgname);
for(i=0;i- 9 years agoHelpfull: Yes(1) No(0)
- find the space in the string.Then collect all the characters followed by the space.
- 10 years agoHelpfull: Yes(0) No(0)
- please explain with program
- 10 years agoHelpfull: Yes(0) No(0)
- #include
#include "stdio.h"
#include "string.h"
int main()
{
int i,len,j,k=0;
char *str;
char *t;
clrscr();
printf("
Enter string ; ");
gets(str);
len=strlen(str);
t[k]=str[0];
for(i=1;i - 9 years agoHelpfull: Yes(0) No(1)
C Other Question