Search
 
SCRIPT & CODE EXAMPLE
 

C

deleting a word with copy fuction c code

 #include<stdio.h>
  2 void my_strcpy(char*,char*);
  3 void main()
  4 {
  5 int i;
  6 char s[10],d[10],ch;
  7 printf("Enter the source string...
");
  8 scanf("%s",s);
  9 printf("Enter the charcter.....
");
 10 scanf(" %c",&ch);
 11
 12 for(i=0;s[i]!=0;i++)
 13 {
 14         if(s[i]==ch)
 15         {       my_strcpy(s+i+1,s+i);
 16                 i--;
 17         }
 18
 19
 20 }
 21
 22
 23 printf("after the deleting s=%s",s);
 24 }
 25 void my_strcpy(char*s,char*d)
 26 {
 27 int i;
 28 for(i=0;s[i]!='';i++)
 29    d[i]=s[i];
 30  d[i]='';
 31 }
~                        
Comment

PREVIOUS NEXT
Code Example
C :: insse suprafata arabila pe ani 
C :: arduino dont working dc motor 
C :: lxde automatic login 
C :: C/AL Convertion of Decimal to String/Text 
C :: With which of the following can you run code without provisioning or managing servers and pay only for the compute time consumed (there is no charge when the code is not running)? 
C :: printing a string with putchar 
C :: do a barrel roll 
C :: program in c to print 1 to 100 without using loop 
C :: https://www.tiktok.com/@kaiwan.99/video/7115521325766069510?is_from_webapp=1&sender_device=pc&web_id=7083069815002449410 
C :: run steam as root 
C :: fork 
C :: divide a linked list into three parts based on their position mod 3. 
C :: winautomation block input not working 
C :: arrow keys gaming keyboard 
C :: Parsing using strtok 
C :: java Node<E 
C :: fraction sum c 
C :: pdo crud 
C :: c type conversion 
C :: logarithmus c math.h 
C :: c# Regex similar wor 
C :: how to make random string in c 
C :: /usr/bin/mandb: fopen /var/cache/man/7935: Permission denied 
C :: passing an array of unspecified number of variables to a function 
C :: array in c 
C :: C printf Declaration 
C :: mongodb delete all documents 
Dart :: dart string remove first character 
Dart :: rupee icon in flutter 
Dart :: type check of variable dart 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =