i want to write program to print alternate characters in string
i have tried following code but it prints first character at infinte times
whats wrong in below code?
Code:#include <stdio.h> int main() { char s[100];int i,l; printf("Enter string "); scanf("%s",s); for(i=0;i<=strlen(s);i+2) printf("%c",s[i]); }