Zoho Strings Quiz 1

Question 1

Time: 00:00:00
What is the output of the C Program with Strings.?

int main()
{
char str[]={'p','r','e','p'};
printf("%s",str);
return 0;
}

p

p

prep

prep

0(zero)

0(zero)

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00

What is String in C language?

The string is a new Data Type in C

The string is a new Data Type in C

The string is an array of Characters with null character as the last element of array.

The string is an array of Characters with null character as the last element of array.

The string is an array of Characters with null character as the first element of array

The string is an array of Characters with null character as the first element of array

The string is an array of Integers with 0 as the last element of the array.

The string is an array of Integers with 0 as the last element of the array.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00

A C string elements are always stored in?

 Random memory locations

 Random memory locations

 Alternate memory locations

 Alternate memory locations

 Sequential memory locations

 Sequential memory locations

 None of the above

 None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00

Is there any function declared as strstr()?

True

True

False

False

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00

If the two strings are identical, then strcmp() function returns?

-1

-1

1

1

Zero (0)

Zero (0)

Yes

Yes

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00

Which of the given function is used to return a pointer to the located character?

strrchr()

strrchr()

strxfrm()

strxfrm()

memchar()

memchar()

strchar()

strchar()

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00

Which of the following function is used to find the first occurrence of a given string in another string?

strchr()

strchr()

strrchr()

strrchr()

strnset()

strnset()

strstr()

strstr()

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00

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

strrchr()

strrchr()

strnstr()

strnstr()

strstr()

strstr()

None of the Above

None of the Above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00

What would be the output of the following C programs ?                                                               
#include
#include
void main()
{
char str1[20] = "Hello", str2[20] = " World";
printf("%s\n", strcpy(str2, strcat(str1, str2)));
}


Hello

Hello

Hello World

Hello World

Run Time Error

Run Time Error

Compilation Error

Compilation Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00

 What is the prototype of strcoll() function?


int strcoll(const char *s1,const char *s2)

int strcoll(const char *s1,const char *s2)

int strcoll(const char *s1)

int strcoll(const char *s1)

int strcoll(const *s1,const *s2)

int strcoll(const *s1,const *s2)

int strcoll(const *s1)

int strcoll(const *s1)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%

Prime

Prime Mock

Topic-Wise Full Mock and much more

For Zoho
Get Prime Mock

Prime

Prime Video

Full Video Course for Zoho

For Zoho
Get Prime Video

Comments