wap to print first character of your name and name is given through the keyboard .

 

#include<stdio.h>
main()
{
   char a[20];
   int b;
   
   printf("enter yr string :");
   scanf("%s",&a);


printf("first alphabate of yr name is %c",a[0]);


}

output :
enter yr string :rahul
first alphabate of yr name is r

Comments