Friday, 25 May 2018

Copy string from source to destination STRLEN ,STRCPY STRING FUNCTION IN C





#include<stdio.h>

#include<conio.h>

#include <string.h>



main()

{





char source[50];

printf("Enter the string: ");

gets(source);

int x=strlen(source);

char dest[x];

strcpy(dest,source);



printf("\nsource string is: %s ",source);

printf("\nDestination string is: %s ",dest);







}

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...