Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 are the steps u follow to create an custom idoc program in which environment u create the program?

0 Answers   HCL,


Explain what are db_options used for?

0 Answers  


Why did they used to make the mill chimneys so tall?

0 Answers  


differences between pass by reference and pass by value in c language?

0 Answers  


How EVA granules manufactured (I wanted to know the manufacturing process). (Virgin Granules) and what are the Raw Materials used.

0 Answers   LG, Renewsys,






how can one get scholership based on gre score ang how much scholarship one can get, plz suggest the way one can apply and get scholarship

0 Answers  


Write a test case plan for a typical banking application which involves functionalities like Balance enquiry, deposit, fund transfer etc. Make your assumptions and mention the same in your answer sheet.

0 Answers  


what kind of wood is in high demand in india?

0 Answers  


Has anyone attended interviews in IITs for positions like Research fellowships/assistants? If yes, please share the experience about how complex the interview was, etc. etc.

0 Answers  


discuss the technique for implementing high performance computing

0 Answers  


what is the formula/ ratio for hollow block? considering to a 40 kgs of portland cement.

0 Answers  


which is having more efficiency smaller power plant or bigger power plant? why?

1 Answers   L&T,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5082)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4449)
  • Electrical Engineering Interview Questions Electrical Engineering (16623)
  • Electronics Communications Interview Questions Electronics Communications (3916)
  • Chemical Engineering Interview Questions Chemical Engineering (1094)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (214)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3008)
  • 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 (171)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (0)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)