C program for reverse the string , C/C++ Programming

Assignment Help:

C Program for REVERSE THE STRING

#include stdio.h>

#include conio.h>

#include string.h>

void main()

{

          char name[30];

          char *s;

          int i,len;

          clrscr();

          printf("ENTER THE STRING: ");

          gets(name);

          len=strlen(name);

          s=&name[len-1];

          for(i=len-1;i>=0;i--)

 

          {

                   putchar(*s);

                   s--;

          }

          getch();

}

 

OUTPUT :

ENTER THE STRING : KAMLESH

HSELMAK

 

 


Related Discussions:- C program for reverse the string

Android - iphone mobile game, I am seeking a developer to create a mobile g...

I am seeking a developer to create a mobile game for me. I want an endless runner game with simple controls. The game needs to be a 3D game in a 2D view. The graphics and animation

How do i develop a subscript operator for a matrix class?, Employ operator ...

Employ operator () instead of operator[]. While you have multiple subscripts, the cleanest way to do it is along with operator () instead of with operator[]. The reason is that

Program for metric conversions, Write a program called Converter that does ...

Write a program called Converter that does three types of metric conversions. Your program should prompt the user for the selection conversion, prompt for input data, and display t

Program, write a class player that contains attributes for player name,avg ...

write a class player that contains attributes for player name,avg and team.write three functions to input,change and display these attributes.also write a constructor that asks for

All topics in c, Give practice in writing program''s..

Give practice in writing program''s..

Lexicographic permutation, Ask questioGiven an integer n and a permutation ...

Ask questioGiven an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. I

Read writers problem, Readers Writers with Processes and Threads Write two ...

Readers Writers with Processes and Threads Write two programs implementing ``reader pritority readers-writers synchronization'''' on files. One program will use processes, created

Explain about the unions, Explain what are Unions? The Unions like as s...

Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union

Need help, how to make basics strong and best logic skills what are the bes...

how to make basics strong and best logic skills what are the best way to be a expert programmer ? what counts a lot knowledge or practice?

Explain about evaluation of expression in c language, Explain about Evaluat...

Explain about Evaluation of Expression in c language? An Expressions are evaluated using an assignment statement of the form: variable = expression; The Variable is any v

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