Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

" ; " after loop



Iterative statement



Header file



Specifer



Working with switch case




String_ reveres a string




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include #define pf printf int main() { char str[100]; int i,l=0; //input data pf("Enter the string: "); gets(str); pf("\nThe given string is:\t"); //showing given string for(i=0;str[i]!='\0';i++) { pf("%c",str[i]); l++; } pf("\nThe reveres of the string is:\t"); //reveres given string for(i=l;i>=0;i--) pf("%c",str[i]); return 0; }
OUTPUT:


© 2018 - All rights reserved