To write a program a program that inputs a string “health is wealth” and output should be “HealthIsWealth” follow the following commands.
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main(void)
{
Clrscr();
Char string[40];
Int I;
printf(“Input for statement: “\n);
gets(string);
int len-strlen(string);
string[0]=string[0]-32;
for(i=1;i<=len;i++)
{
if (string[1]==32)
{
string[i+1]=string[i+1]-32;
}
}
puts(string);
getch();
}
August 28, 2011