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

C/c++ program, luminous jewel polishing necklace,c/c++ programming

luminous jewel polishing necklace,c/c++ programming

Graphical user interface designed for the output peripherals, Introduction ...

Introduction to I/O interfacing, discuss microcontrollers applications in industry. Detailed product design specifications that have sections on both hardware and software inclu

How does a structure differ from an array, Question : (a) What is a str...

Question : (a) What is a structure? Provide a simple example of your own to illustrate this feature. (b) How does a structure differ from an array? (c) Describe a structu

C++ code, write c++ programm calculate electricity bill with person name,us...

write c++ programm calculate electricity bill with person name,use ,id

Explain static variables, Static Variables Static variables have the si...

Static Variables Static variables have the similar scope s automatic variables, but, unlike automatic variables, static variables retain their values over number of function ca

Define classes and objects, Classes and Objects A class is a vehicle to...

Classes and Objects A class is a vehicle to execute the OOP features in the C++ language. Once a class is declared, an object of that type can be explained. An object is said t

Cin, how we use the cin command and why we use this command????

how we use the cin command and why we use this command????

Convert afl amibroker to dll, Project Description: I need to convert AFL...

Project Description: I need to convert AFL code of Amibroker to DLL plugin to hide original formula, and also to protect the DLL and making it hardware locked. I need to wrap th

Stack, write a simple c++ program to implement a stack: 1. push 2. pop

write a simple c++ program to implement a stack: 1. push 2. pop

Explain the class invariant, Explain the class invariant. - It's a cond...

Explain the class invariant. - It's a condition that ensures correct working of a class and defines all the valid states for an object. - When an object is created class inv

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