strcpy ve strcat örneği

Hits: 1

image_pdfpdf indir
#include <stdio.h>
#include <conio.h>
#include <string.h>
 
void main(void)
{
      char adi[25];
      char ad2[25];
      char soyadi[25];
      char tamadi[100];
 
      clrscr();
 
      printf("\n Adi        :");
      gets(adi);
      fflush(stdin);
 
      printf("\n Ikinci Adi :");
      gets(ad2);
      fflush(stdin);
 
      printf("\n Soyadi     :");
      gets(soyadi);
      fflush(stdin);
 
      strcpy(tamadi,adi);
      strcat(tamadi," ");
      strcat(tamadi,ad2);
      strcat(tamadi," ");
      strcat(tamadi,soyadi);
 
      printf("\n Adi Soyadi : %s",tamadi);
 
      getch();
}