Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Header file



" ; " after loop



Test expression



Working with switch case



Comment




String_ CMP - strcpy function




// AHF C PROGRAM SOLVING

//solving here CHARACTER MANIPULATION FUNCTION ( CMP ) 	programming problem

#include<stdio.h> #include<string.h> #define pf printf int main() { char str1[100],str2[100]; //input first data pf("Enter the string: "); gets(str1); //input second data pf("\nEnter the second string: "); gets(str2); //copies data of str2 into str1 strcpy(str1,str2); //printing copied data pf("\n%s",str1); return 0; }
OUTPUT:


© 2018 - All rights reserved