Answer:
The programming language is not stated; However, I'll answer your question using C++ programming language.
Comments are used for explanatory purpose
Program starts here
#include<iostream>
#include <string>
using namespace std;
int main()
{
//Declare Variables
string firstName, middleName, lastName;
char firstInitial, middleInitial, lastInitial;
/*Initialize firstName, middleName and lastName (Replace values with your details)*/
firstName = "First Name";
middleName = "Middle Name";
lastName = "Last Name";
// Get Initials
firstInitial = firstName.at(0);
middleInitial = middleName.at(0);
lastInitial = lastName.at(0);
//Print Results
cout<<"Lastname: "<<lastName<<endl;
cout<<"Firstname: "<<firstName<<endl;
cout<<"Middlename: "<<middleName<<endl;
cout<<"Last Initial: "<<lastInitial<<endl;
cout<<"First Initial: "<<firstInitial<<endl;
cout<<"Middle Initial: "<<middleInitial<<endl;
return 0;
}