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
What is the use of typedef in c?
How can type-insensitive macros be created?
Why is c still so popular?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What are static variables in c?
What is floating point constants?
What is cohesion and coupling in c?
Write a program to reverse a string.
What is identifier in c?
What are the header files used in c language?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
What are the similarities between c and c++?
Can an array be an Ivalue?
i have a written test for microland please give me test pattern