C Strings - C programming (MCQ) questions for Q. 27117

Q.  Comment on the following C code?

#include <stdio.h>
printf("%d", sizeof(strlen("HELLOWORLD")));

- Published on 14 Feb 17

a. Output, 4
b. Output, 10
c. Output, 16
d. Error, sizeof cannot evaluate size of a function.

ANSWER: Output, 4

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)