Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
Which standard library function will you use to find the last occurance of a character in a string in C? ?->(Show Answer!)
Question Set

1. Which standard library function will you use to find the last occurance of a character in a string in C?





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
    strrchr() returns a pointer to the last occurrence of character in a string. Example: #include <stdio.h> #include <string.h> int main() { char str[30] = "12345678910111213"; printf("The last position of '2' is %d.\n", strrchr(str, '2') - str); return 0; } Output: The last position of '2' is 14.
Show Similar Question And Answers
QA->Correct sentences among the following are: ) The tea is too hot that I cannot drink (2) Work hard, lest you should miss the chance (3) Unless you study well, you will fail (4) Unless you study well, you will pass....
QA->If function inside another function is called a _____ Function....
QA->Who said ‘Happiness is when what you think; what you say; and what you do are in harmony’?....
QA->If you have a Power point show you created and want to send using E-mail to another teacher you can add the show to your E-mail message as an______....
QA->Energy stored in a compressed string is?....
MCQ->Which standard library function will you use to find the last occurance of a character in a string in C?....
MCQ->Which of the following statements are correct? String is a value type. String literals can contain any character literal including escape sequences. The equality operators are defined to compare the values of string objects as well as references. Attempting to access a character that is outside the bounds of the string results in an IndexOutOfRangeException. The contents of a string object can be changed after the object is created.....
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->S1:The first thing you have to do is to speak with a strong foreign accent and speak broken english S6:Half a dozen people will immediately overwhelm you with instructions P:He will be interested in you becaues you are a foreigner and try to understand you and be ready to help you. Q:He will not expect you to be polite and use elaborate grammatical phrases R:Then every english person to whom to speak will at once know you are a foreigner and try to help you S:If you shout,"Please,Charing cross?Which way?",you will have no difficulty....
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