Question Set

1. Which of the following statements are correct ? 1: A string is a collection of characters terminated by '\0'. 2: The format specifier %s is used to print a string. 3: The length of the string can be obtained by strlen(). 4: The pointer CANNOT work on 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
    Clearly, we know first three statements are correct, but fourth statement is wrong. because we can use pointer on strings. Eg. char *p = "IndiaBIX".
Show Similar Question And Answers
QA->In an examination of mathematics Rajesh obtained more marks than the total marks obtained by Rahim and Sabu. The total marks obtained by Rahim and Saji was more than the Rajesh’s. Rajesh obtained more marks than Saji, Reenu obtained more marks than Rajesh. Who amongst them obtained the....
QA->P can do a work in the same time in which Q and R together can do it. If P and Q work together, the work can be completed in 10 days. R alone needs 50 days to complete the same work. then Q alone can do it in....
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 can complete a work in 12 days with a working of 8 hours per day. B can complete the same work in 8 days when working 10 hours a day. If A and B work together, working 8 hours a day, the work can be completed in --days.....
QA->P can do a work in 24 days. Q can do the same work in 9 days and R can do the same in 12 days. Q and R start the work and leave after 3 days. P finishes the remaining work in --- days.....
MCQ->Which of the following statements are correct ? 1: A string is a collection of characters terminated by '\0'. 2: The format specifier %s is used to print a string. 3: The length of the string can be obtained by strlen(). 4: The pointer CANNOT work on string.....
MCQ->Which of the following statements correctly declare a function that receives a pointer to pointer to a pointer to a float and returns a pointer to a pointer to a pointer to a pointer to a float?....
MCQ->Which of the following statements are correct about the below declarations? char p = "Sanjay"; char a[] = "Sanjay"; 1: There is no difference in the declarations and both serve the same purpose. 2: p is a non-const pointer pointing to a non-const string, whereas a is a const pointer pointing to a non-const pointer. 3: The pointer p can be modified to point to another string, whereas the individual characters within array a can be changed. 4: In both cases the '\0' will be added at the end of the string "Sanjay".....
MCQ->Which of the following statements are correct about the Stack collection? It can be used for evaluation of expressions. All elements in the Stack collection can be accessed using an enumerator. It is used to maintain a FIFO list. All elements stored in a Stack collection must be of similar type. Top-most element of the Stack collection can be accessed using the Peek() method.....
MCQ->A machine P can print one lakh books in 8 hours, machine Q can print the same number of books in 10 hours while machine R can print them in 12 hours. All the machines are started at 9 A.M. while machine P is closed at 11 A.M. and the remaining two machines complete work. Approximately at what time will the work (to print one lakh books) be finished ?....
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