Question Set

1. The library function used to find the last occurrence of a character in a string is





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
    Declaration: char *strrchr(const char *s, int c); It scans a string s in the reverse direction, looking for a specific character c. Example: #include <string.h> #include <stdio.h> int main(void) { char text[] = "I learn through IndiaBIX.com"; char *ptr, c = 'i'; ptr = strrchr(text, c); if (ptr) printf("The position of '%c' is: %d\n", c, ptr-text); else printf("The character was not found\n"); return 0; } Output: The position of 'i' is: 19
Show Similar Question And Answers
QA->If function inside another function is called a _____ Function....
QA->Energy stored in a compressed string is?....
QA->What is the term used for the occurrence of more than one type of morphologically different leaves on the same plant?....
QA->Mixture of which pair of gases is the cause of occurrence of most of the explosions in mines?....
QA->Which environment leads to the occurrence of acid rain?....
MCQ->The library function used to find the last occurrence of a character in a string is....
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->Which standard library function will you use to find the last occurance of a character in a string in C?....
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