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
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 |
What is a superheterodyne receiver?
why this companay? For example: Why Dell?
what is elligibility criteria of 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
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?
IS THE SAMPLE POINT OF LPG SPHERE TANK PEFOR OR AFTER BUMP?
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!!!
please tell me difference between router and cisco router
what is the advantage of msil in c#
what is difference between semaphre and deadlock
can u tell me what are the subjects involved in group I and II and how i prepare for the exam