Vidyalelo
C Programming · Q244

C Fundamentals

Programming · C Programming · question 244

Q244

What will be the output of the following C code? #include #include int main() char *str = "x"; char c = 'x'; char ary[1]; ary[0] = c; printf("%d %d", strlen(str), strlen(ary)); return 0;

A.
1 1
B.
2 1
C.
2 2
D.
1 (undefined value)
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board