Reverse a string word by word??

Answer Posted / vamsi

#include<stdio.h>
#include<conio.h>
void main()
{
char a[40],temp;
int count=0;
printf("enter the string :");
gets(a);
for(int i=40;a[i]!=a[1];i--)
printf (a[i]);
printf (a[1]);
}

Is This Answer Correct ?    1 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is meant by high-order and low-order bytes?

627


What is main () in c language?

586


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

676


What 'lex' does?

710


How can you be sure that a program follows the ANSI C standard?

1117






What are the __date__ and __time__ preprocessor commands?

561


how many errors in c explain deply

1623


How important is structure in life?

581


When should a type cast not be used?

618


How can I open files mentioned on the command line, and parse option flags?

583


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1483


what is bit rate & baud rate? plz give wave forms

1508


Explain how can I convert a number to a string?

636


How are portions of a program disabled in demo versions?

739


What is string function in c?

529