What the error of code in C?
#include <stdlib.h>
#include <stdio.h>
int main()
{
char i;
for(i = 'a'; i <= 'z'; i++){
printf("%s ", i);
}
return 0;
}
You should be using %c for printing out characters. %s is for string literal and it maps for char*
Changing your code to printf("%c ",i);
works
Topic archived. No new replies allowed.