to write a program to search a character in a string and to
print till the character in the string using pointers in c
program



to write a program to search a character in a string and to print till the character in the string..

Answer / guest

char str[20]="some string";
char *ptr=str;
char search_char=e;
for(int t=0;i<strlen(str);i++)
{
if((*ptr)==e) (*ptr)=\0' //null charachter
}
printf("%s",str);

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More Engineering AllOther Interview Questions

What is a superheterodyne receiver?

2 Answers  


why this companay? For example: Why Dell?

1 Answers   DELL,


what is elligibility criteria of hcl?

0 Answers   HCL,


what is the heat insulation material is adaptable for a flue gas duct that carries waste heat from brick kiln to brick drier and what temperature is required to maintain at the tunnel to dry adobe bricks adequately

0 Answers  


Why Ammeter is always connected in series in the circuit and Voltmeter in parallel?

14 Answers   BEL, College School Exams Tests, DRDO, Electrical Tech, UOB,






What would be your first invention?

0 Answers  


IS THE SAMPLE POINT OF LPG SPHERE TANK PEFOR OR AFTER BUMP?

0 Answers  


Can anyone tell me the exact formulae with explanation for the questions related to cube which is asked for CTS? I have seen varieties of formulae in different sites.I need the exact on... So pls help me out!!!

0 Answers   CTS,


please tell me difference between router and cisco router

0 Answers   NSN,


what is the advantage of msil in c#

0 Answers  


what is difference between semaphre and deadlock

0 Answers  


can u tell me what are the subjects involved in group I and II and how i prepare for the exam

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)