Following are the code to input string value in C Language.
Program Explanation:
- Defining header file.
- Defining the main method.
- Inside the method, two char array "lname, fname" is declared, which inputs value from the user-end.
- After input value, a print method is declared that prints the last name with "," and first name.
Program:
#include <stdio.h>//header file
int main()//defining main method
{
char lname[15],fname[15];//defining two char array
scanf("%s%s",fname, lname);//use input method that takes string value in it
printf("%s , %s",lname,fname);//use print method that prints string value
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/14436979