I want to enter 10 words in a vector and print the inverse.
#include <stdio.h>
#include <conio.h>
#include <string.h>
void reverse(char str[]);
Code:main() { clrscr(); char str[200],str1[200]; int len; int i; int j; for(int i=1; i<=10; i++){ printf("\nEnter your nickname:"); gets( str[i]); len=strlen(str); for ( i=0,j=len-1;i<len;i++,j--) str1[i]=str[j]; str1[i]='\0'; puts(str1); getch(); } }



LinkBack URL
About LinkBacks


