Tell about strtok & strstr functions
Answers were Sorted based on User's Feedback
include <string.h>
char *strstr (char * s1 , const char * s2 );
In the above case
The strstr function locates the first occurrence in the
string pointed to by s1 of the sequence of characters
(excluding the terminating null character) in the string
pointed to by s2.
The strstr function returns a pointer to the located
string, or a null pointer if the string is not found. If s2
points to a string with zero length, the function returns
s1.
The strtok function
See the below case
#include <string.h>
char *strtok (char * s1 , const char * s2 );
A sequence of calls to the strtok function breaks the
string pointed to by s1 into a sequence of tokens, each of
which is delimited by a character from the string pointed
to by s2. The first call in the sequence has s1 as its
first argument, and is followed by calls with a null
pointer as their first argument. The separator string
pointed to by s2 may be different from call to call.
The strtok function returns a pointer to the first
character of a token, or a null pointer if there is no token
| Is This Answer Correct ? | 12 Yes | 0 No |
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
I need previous papers of CSC.......plz help out by posting them.......
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
Can two or more operators such as and be combined in a single line of program code?
Why doesnt this code work?
n=7623 { temp=n/10; result=temp*10+ result; n=n/10 }
Explain how do you generate random numbers in c?
write a program to print data of 5 five students with structures?
what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question
N O S I E R + A S T R A L ---------------- 7 2 5 6 1 3
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What are preprocessor directives?