C program for change the case in title case, C/C++ Programming

Assignment Help:

 

#include stdio.h>

#include conio.h>

#include ctype.h>

#include string.h>

 

void main()

{

          int i=0,j=0,length;

          char a[30];

          clrscr();

          for(i=0;i<30;i++)

          {

                   a[i]=0;

          }

          i=0;

          printf("ENTER THE STRING: ");

          do{

                   a[i++]=getchar();

          }while(a[i-1]!='\n');

          a[i]='\0';

          length=strlen(a);

          for(i=0;i<=length;i++)

          {

                   a[i]=tolower(a[i]);

          }

          i=0;

          a[0]=a[0]-32;

                     for(i=0;a[i]!='\0';i++)

                     {

                             if(a[i]==' ')

                             {

                                      a[i+1]=a[i+1]-32;

                             }

                     }

                   printf("THE OUTPUT OF STRING IS %s",a);

          getch();

}

 

OUTPUT :

ENTER THE STRING: KAMLESH D MENGAR

 THE OUTPUT OF STRING IS Kamlesh D Mengar


Related Discussions:- C program for change the case in title case

Notion of encapsulation, The purpose of this assignment is to familiarize y...

The purpose of this assignment is to familiarize you with the notion of encapsulation as well as some aspects of IP and ICMP. Write your programs in C or C++. They will be grade

Keywords in cpp, Define Keywords in C++ K e y w o r d s: ...

Define Keywords in C++ K e y w o r d s: K e y w o rd s a r e t h e w o rd s a l r e a d y u s e d b y C + + i n i t s c

Arrays, how to declare arrays

how to declare arrays

Explain reference types, Reference Types The symbol "&" is interpreted ...

Reference Types The symbol "&" is interpreted as an address operator as well as AND operator. This operator is also used to declare a "reference variable". A reference is refer

C program for count sorted characters, # include stdio.h> # include coni...

# include stdio.h> # include conio.h> # include string.h> void main()   {           int i=0,j=0;           char a[100],temp;           clrscr();

Program that print the number of hops, You are working for a computer gamin...

You are working for a computer gaming company and have been asked to look at a survival game.  You will be simulating a rabbit stranded on an island, collecting a large number of s

Multiple constructor, Constructor public class ListNode {    //...

Constructor public class ListNode {    // package access members; List can access these directly private E data; // data for this node privateListNode nextNode; /

Data structure, how to convert a general tree into binary tree with example...

how to convert a general tree into binary tree with example

I need decompile library(.dll or .so) into source code, I need Decompile Li...

I need Decompile Library(.DLL or .SO) into source code Project Description: I am seeking an experienced programmer or anyone who knows a thing or two about reverse engineerin

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd