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
Suggesting that there can be 62 seconds in a minute?
Is c procedural or object oriented?
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.
Explain how can I remove the trailing spaces from a string?
What are the 5 types of inheritance in c ++?
How can I get random integers in a certain range?
Why c is called free form language?
simple program of graphics and their output display
State the difference between realloc and free.
What is the most efficient way to count the number of bits which are set in an integer?
What does main () mean in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
Explain spaghetti programming?
Explain how does free() know explain how much memory to release?