Strings - Point Out Correct Statements Multiple Questions and Answers.




1.Which of the following statements are correct about the program below?
A. The code converts a string in to an integer
B. The code converts lower case character to upper case
C. The code converts upper case character to lower case
D. Error in code

2.Which of the following statements are correct ?

A string is a collection of characters terminated by '\0'.

The format specifier %s is used to print a string.

The length of the string can be obtained by strlen().

The pointer CANNOT work on string.

A. 1, 2
B. 1, 2, 3
C. 2, 4
D. 3, 4

3.Which of the following statement is correct?
A. strcmp(s1, s2) returns a number less than 0 if s1>s2
B. strcmp(s1, s2) returns a number greater than 0 if s1
C. strcmp(s1, s2) returns 0 if s1==s2
D. strcmp(s1, s2) returns 1 if s1==s2




Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers