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

Does c have an equivalent to pascals with statement?

779


What is New modifiers?

892


What are types of preprocessor in c?

821


What functions are used for dynamic memory allocation in c language?

868


Explain pointers in c programming?

879


What is chain pointer in c?

796


What is an auto keyword in c?

878


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2892


Define the scope of static variables.

843


What are types of structure?

842


What is hashing in c?

905


What is a nested loop?

881


What is extern keyword in c?

889


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2259


Is it acceptable to declare/define a variable in a c header?

886