Given the string “WORDPROCESSING”,write a program to read the string from the terminal and display the same in the following formats:

#include<stdio.h>

int main()
{
char a[2],b[11];
printf(“Enter the string:”);
scanf(“%4s%10s”,a,b);
printf(“(a) %s %s\n”,a,b);
printf(“(b) %s\n %s\n”,a,b);
printf(“(c) %.1s.%.1s.”,a,b);
return 0;
}

Published by MD FAHAD UDDIN

My name is Mohammad Faha..

Leave a comment

Design a site like this with WordPress.com
Get started