Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a function for strtok()??

Answer Posted / yogesh

strtok() function is used for tokanizing the given string.
The output of the following program will be as follows.
How|are|you|I|am|Fine.

#include<stdio.h>
int main()
{
char *p;
char str[40]="How are you,I am Fine";
p=strtok(str," ");
printf("%s",p);
do
{
p=strtok('\0',", ");
if(p)
printf("|%s",p);
}while(p);
printf("\n");
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suggesting that there can be 62 seconds in a minute?

1104


Is c procedural or object oriented?

1085


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

2056


Explain how can I remove the trailing spaces from a string?

1104


What are the 5 types of inheritance in c ++?

1073


How can I get random integers in a certain range?

1125


Why c is called free form language?

1074


simple program of graphics and their output display

2048


State the difference between realloc and free.

1145


What is the most efficient way to count the number of bits which are set in an integer?

1119


What does main () mean in c?

1146


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1127


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1134


Explain spaghetti programming?

1320


Explain how does free() know explain how much memory to release?

1137