program to print character arraywrite a program


Program to print character array:

Write a program to print the character array by using string class functions.

void main()

{  char line[30];

  int i=0;

 

clrscr();

printf("enter the line\n");

//scanf("%[^\n]",line);

scanf("%s",line);

 for(i=0;i<=strlen(line)-1;i++)

{

 line[i] =(int)line[i]-32;

}

printf("%s",line);

getch();

}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: program to print character arraywrite a program
Reference No:- TGS0174856

Expected delivery within 24 Hours