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 Posted / 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 View All Answers
WHAT IS THE PROPER LOCATION OF SAMPLE POINT OF LPG SPHERE TANK?
hi... i just want to know that how could join the AAI with an B.E back ground??? please help me out.
Based on the Job Description above, please indicate in details why you are a good match for this position?
plz send me interview questions & answers of Data Structure
How do aeroplanes fly? Why can some fly up-side down?
I am refused L1-B visa filed by my employer on May 09 by US consulate Chennai. When i am eligible to apply L1-B visa again through my employer?
How To Servers For Malitnationl Bank?
Tell me about a time when you had too many things to do and you were required to prioritize your tasks
What is the difference between tcp/ip protocol and IP protocol?
What is the actual procedure of charging synthetic oil if the machine is under positive refrigerant pressure.
A code which had some declarations of some data items. There were a couple of normal data items(char,int..) and some pointers as well and a malloc call. You have to find the total memory taken up in the stack(Hint:Pointers and all are allocated in heap, not in stack, so dont count them).Also in most of these questions, they were specifying that the OS was 32 bit
Why is it that a single, all – encompassing metric cannot be developed for programme complexity or programme quality?
how to count number of 3's in 100
Which one is more efficient in terms of required memory space call-by-value or call-by-referance?
i have applied for junior engg. signal II please send me questions papers for it