Daily IT Quiz Mcq – 15

information technology

Dear Aspirants,

Daily IT Quiz is the basic part of the Himachal GK. It is helpful to increase your knowledge based on information technology. It is a series of Himachal Gk MCQs. You can also play our weekly quiz and download all quizzes PDF as well.

1. What is the length of the null string?
(A) 1
(B) 0
(C) 2
(D) 4

2. Every string must be terminated by__________?
(A) Carriage return character
(B) Null character
(C) Linefeed character
(D) Newline character

3. Which of the following function is used to reverse the string?
(A) Strcpy
(B) Strlen
(C) Strcmp
(D) None of these

4. If we consider the string declaration as “char * [10];”, what is the length of the string that can be correctly represented by x?
(A) 9
(B) 10
(C) 11
(D) All of these

5. Which of the following input function can not be used to input the multiword string?
(A) getch()
(B) gets
(C) scanf ()
(D) printf ()

6. Which of the following is correct, if we write strcmp(s1, s2), returns a value?
(A) <0 when s1<s2
(B) >0 when s1>s2
(C) =0 when s1=s2
(D) All of these

7. If the function strcat (s1, s2) is implemented, then the concatenation will return?
(A) s2 at the end of s2
(B) s2 at the end of s1
(C) s1 at the end of s2
(D) s2 at the start of s2

8. the function strcmp (“Abcd”, “ABCD”) will return?
(A) 0
(B) -1
(C) 1
(D) None of these

9. Which of the following operation could not be performed on character string with string functions?
(A) Combining a string
(B) Copying a string to another
(C) Removing a string
(D) Comparing strings for equality

10. Which of the following function is correct in case of conversion of string digits into their integer value?
(A) x = stoi(string)
(B) x = atoi(stinrg)
(C) x = chartoint(string)
(D) None of these

 

About pankaj 837 Articles
Pankaj is passionate about his work. Because he loves what he does. He is a full time blogger and also has experience in Computer as well as in Teaching Field. DHGK is the dream Project of his own Mind to help aspirants.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.