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
how do you programme Carrier Sense Multiple Access
What is main () in c?
What are c preprocessors?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Why can't I perform arithmetic on a void* pointer?
Why does the call char scanf work?
What is a structure and why it is used?
What are the 32 keywords in c?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What are the __date__ and __time__ preprocessor commands?
What does the && operator do in a program code?
What is a void * in c?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
what type of questions arrive in interview over c programming?
Write a program on swapping (100, 50)