Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
Which of the following function is used to find the first occurrence of a given string in another string? ?->(Show Answer!)
Question Set

1. Which of the following function is used to find the first occurrence of a given string in another string?





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.02 pm
    The function strstr() Finds the first occurrence of a substring in another string Declaration: char *strstr(const char *s1, const char *s2); Return Value:
    On success, strstr returns a pointer to the element in s1 where s2 begins (points to s2 in s1).
    On error (if s2 does not occur in s1), strstr returns null. Example: #include <stdio.h> #include <string.h> int main(void) { char *str1 = "IndiaBIX", *str2 = "ia", *ptr; ptr = strstr(str1, str2); printf("The substring is: %s\n", ptr); return 0; } Output: The substring is: iaBIX
Show Similar Question And Answers
QA->A statement followed by two assumptions I and II is given. You have to consider the statement to be true even if it seems to be at variance from commonly known facts. You are to decide which of the given assumptions can definitely be drawn from the given statement. Indicate which one of the four given alternatives is correct ? Statement : If more encouragement is given to Sports, Indians will win more gold medals at the Olympic Games. Assumptions : I. Indians do not win gold medals. II. More enc....
QA->If function inside another function is called a _____ Function....
QA->Two statements are given followed by two conclusions I and II. You have to consider the two statements to be true even if they seem to be at variance from commonly known facts. You have to decide which one of the given conclusions is definitely drawn from the given statements. Statement : All virtuous persons are happy. No unhappy person is virtuous. Conclusions : I. Happiness is related to virtue II. Unhappy person is not virtuous.....
QA->A word given in Capital Letters is followed by four answer words. Out of these only one can be formed by using the letters of the given words. Find out that word— ENVIRONMENT....
QA->A word given in capital letters is followed by four words. Out of these only one cannot be formed by using the letters of the given word. Find out that word— REVOLUTIONARY....
MCQ->Which of the following function is used to find the first occurrence of a given string in another string?....
MCQ->Which of the following snippets are the correct way to convert a Single into a String? Single f = 9.8f; String s; s = (String) (f); Single f = 9.8f; String s; s = Convert.ToString(f); Single f = 9.8f; String s; s = f.ToString(); Single f = 9.8f; String s; s = Clnt(f); Single f = 9.8f; String s; s = CString(f);....
MCQ->Which of the following is correct way to convert a String to an int? String s = "123"; int i; i = (int)s; String s = "123"; int i; i = int.Parse(s); String s = "123"; int i; i = Int32.Parse(s); String s = "123"; int i; i = Convert.ToInt32(s); String s = "123"; int i; i = CInt(s);....
MCQ->Consider the following statements about conditions that make a metal semiconductor contact rectifying N type semiconductor with work function φs more than work function φM of metalN type semiconductor with work function φs less than work function φM of metalP type semiconductor with work function φs more than work function φM of metalP type semiconductor with work function φs less than work function φM of metal. Of these statements....
MCQ->Which of the following statements are correct about the String Class in C#.NET? Two strings can be concatenated by using an expression of the form s3 = s1 + s2; String is a primitive in C#.NET. A string built using StringBuilder Class is Mutable. A string built using String Class is Immutable. Two strings can be concatenated by using an expression of the form s3 = s1&s2;....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution