ਪਹਿਲਾ ਨਾਮ ਅਤੇ ਅਖੀਰਲਾ ਨਾਮ ਦਾਖਲ ਕਰਕੇ ਜੋੜਣ ਲਈ ਪ੍ਰੋਗਰਾਮ ਲਿਖੋ।

#include<stdio.h>
#include<conio.h>
#include<string.h>

void main()
{
    char fn[20], ln[20];

    clrscr();
    puts("Enter your first name: ");
    gets(fn);
    puts("Enter your last name: ");
    gets(ln);

    strcat(fn, " ");
    strcat(fn, ln);

    printf("Your full name is %s",fn);
    getch();
}

Output:

 

Comments