#include <stdio.h>
int main(void){
char my_name[20];
printf("Enter your name : ");
scanf("%s",my_name);
printf("Welcome %s",my_name);
return 0;
}
Printing string vertically with total number of chars
#include <stdio.h>
int main(void){
int i;
char str[]="Welcome";
for ( i=0;str[i] != '\0';i++){
printf( "%c \n",str[i]);
}
printf("\n Total number of chars = %d",i);
return 0;
}