19.4k views
0 votes
What is the output of the following statement?

printf("%s", strspn("Cows like to moo.", "Ceiklosw ");
a. 10.
b. 8.
c. e.
d. nothing.

User Guybrush
by
5.0k points

1 Answer

3 votes

Answer:

The correct answer is D) Nothing

Step-by-step explanation:

This question speaks to the results of programming using C language.

The printf() function is used to print ('character, string, float, integer, octal and hexadecimal values') onto the output screen when programming using C language program.

We use printf() function

with %d format specifier to display the value of an integer variable,

with %c to display character,

With %f for float variable,

with %s for string variable,

with %lf for double and

with %x for the hexadecimal variable.

Strspn() is often used to calculate the number of identical characters in both string and escape, whether the str1 does not match the str2 characters.

If the above statement is cued into a c compiler, it will thus return an error.

Cheers

User Ismael EL ATIFI
by
5.1k points