In below program, I have find out string length and print each character of string in new line..
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char string[10];
int i=0,lengh=0;
clrscr();
printf("Enter the string: ");
scanf("%s",&string);
lengh=strlen(string);
for(i=0;i<lengh;i++)
{
printf("%c",string[i]);
printf("\n");
}
getch();
}
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char string[10];
int i=0,lengh=0;
clrscr();
printf("Enter the string: ");
scanf("%s",&string);
lengh=strlen(string);
for(i=0;i<lengh;i++)
{
printf("%c",string[i]);
printf("\n");
}
getch();
}