HOW TO PRINT EACH LETTERS OF A STRING USING CPP
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
int a;
char b[80];
cout<<"enter
name";
gets(b);
for(a=0;b[a]!='\0';a++)
{
cout<<b[a]<<endl;
}
getch();
}
OUTPUT:
Enter name : KIRAN
K
I
R
A
N
No comments: