answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

char string[20];

int i=0;

printf("Enter the string.\n");

while(i<=19)

{

scanf("%c",&string[i]);

i++;

}

while(i>=0)

{

printf("%c",string[i]);

i--;

}

getch();

}

In this program it is compulsory to enter 20 characters.

Now we can write a program in which it is not necessary.

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

char string[20];

int length;

printf("enter the string.\n");

gets(string);

length=strlen(string);

length--;

while(length>0)

{

printf("%c",string[length]);

length--;

}

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you display a text reversely in C language without using onlu simply input and output?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is a display adapter a input or output device?

A display ADAPTER is neither. The Display is an output device.


How do you get a Java program to display a backslash in output without it interpreting it as a program command?

Follow the backslash with another backslash: System.out.println("\\ " \"); will display \ " \ on the screen.


How do you Hold the output window to display output in C language?

std::cin:get(); I guess it's about TurboC in Windows. 1. Press Alt+F5, to see the program's output 2. Run your .EXE in a separate DOS-window (Command Prompt)


What are the Output devices of a wearable computer?

output is in the form of light,display or voice....


Is MacBook Pro output mirror or dual display?

It is definitly dual display


What is input output console in c language?

There is no 'console' in C-language, but there is a standard input, a standard output and a standard error. They are pre-opened files (file-handles) you can use in your program without knowing what they actually are.


What is the monitor?

monitor is an output (display) device


When a computer generates a display is called?

When a computer generates any sort of display or result, that is called output. Printers and monitors are examples of output devices.


What is an output device that usually conveys text graphics and video information?

Display Screen


What is output devices used?

Your monitor/display system.


Is a display that while showing you the output allows you to?

touchscreen


What is the output of a XSLT processor?

The output of an XSLT processor is a set of instructions that dictate how to display the XML data.