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
If there's any possiblity for the Enginnerring graduates, Who had backlogs in there acedmic to get a Good MNC job?
how to initialize a pointer to an array?
we have virtual function then why need of pure virtual function.
WHAT IS THE NAMESPACE FOR CUSTOMCONTROL AND USER CONTROL IN ASP.NET?
THESE POSTS ARE FOR THE DURATION OF FIVE YEARS. AFTER COMPLETION OF FIVE YEARS, THE PERSONNEL POSTED AGAINST THESE POSTS ARE LIKELY TO BE CONTINUED IN NIC. CAN Any body say that what it will be happened after 5 years? does they through us out from NIC? Is it a temporary job of 5 years is the probation period?
Please send us a brief description why do you think you can fit to the role
What is the procedure for taking leave while detecting Epf and Esi?
i can access command prompt in my pc. when i type cmd in run,message comes-you are restricted.contact admin. why is it so? how can acces it by just logging in as a user and not as admin.?????
difference between windows 2003 and windows 2008 server
How would Nvidia increase the core clock speed anymore?
there are 50 users in a network, one system is virus affected , how to find that virus affected system?
What is the aim of Value Engineering?
why is the scheduling decision needs to be taken when a process switches from running to waiting state.also,if this is because the next process is to be allocated to cpu then why not a scheduling decision taken when a process switches from ready to running state.
Q1 Design a webpage for a hotel which displays all the information of the hotel such as rooms available, facilities, and packages along with rate list. Apply the different tags available to give it a good style.
Why do sausages split lengthways, rather than around the circumference?