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
Explain the use of bit fieild.
Write a program to implement queue.
what is the different bitween abap and abap-hr?
What does the error message "DGROUP exceeds 64K" mean?
Explain Basic concepts of C language?
Explain the binary height balanced tree?
What are the features of the c language?
What is union in c?
Why malloc is faster than calloc?
What is signed and unsigned?
What does sizeof int return?
How to get string length of given string in c?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What are the loops in c?
Is it possible to have a function as a parameter in another function?