Question 8899 – ISRO CS 2020
December 26, 2023
Question 8904 – ISRO CS 2020
December 26, 2023
Question 8899 – ISRO CS 2020
December 26, 2023
Question 8904 – ISRO CS 2020
December 26, 2023

Question 8901 – ISRO CS 2020

What is the output of the code given below?

#include

int main()

{

char name[ ]=”satellites”;

int len;

int size;

len = strlen (name);

size = sizeof(name);

printf(“%d”, len * size);

return 0;

}

Correct Answer: B

Question 30 Explanation: 
strlen(name) = 10
sizeof(name)=11 // including \0 at the end which is by default for char array in C.
len*size=10 * 11 = 110
A
100
B
110
C
40
D
44
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!