A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

C++ Program to Convert a person\'s name in Abbreviated
Q:

C++ Program to Convert a person\'s name in Abbreviated

0

Abbreviated Name :-

Abbreviated Is A Sort name we can say that if your name is Ghanendra Pratap Yadav Then your Abbreviated  (Sort Name ) Will be G.P.Yadav

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<iostream>
using namespace std;
int main()
{
     char fname[20], mname[20], lname[20];
     cout<<"Enter The First Name Middle Name & Last Name \n";
     cin>>fname >>mname >>lname;
     cout<<"Abbreviated Name: ";
     cout<<fname[0]<<"."<<" "<<mname[0]<<"."<<" ";  cout<<lname<<endl;
     return 0;

}

 

Output:

Enter The First Name Middle Name & Last Name 

Yadav Paratap Ghanendra

Abbreviated Name: Y. P. Ghanendra

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now