No products in the cart.

Write a program to reverse a …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a program to reverse a string.
  • 1 answers

Harshith Ks 6 years, 9 months ago

#include<iostream.h> #include<string.h> int main() {char str[10],temp; int i,j=0; Cout<<"Enter the string :"; Cin.getline(str,10); i=0; j=strlen(str)-1; while(i<j) {temp=str[i]; str[i]=str[j]; str[j]=temp; i++; j--; } Cout<<"Reverse string is "<<str; return(0); }
http://mycbseguide.com/examin8/

Related Questions

Define packages
  • 0 answers
Write a program for swapping two numbers?
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
What is alu
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App