Size value in string

main()
{
printf(“%d”, sizeof(“learning”));
}
Tutorial answer:
9
Debugging solution
Value(sizeof(“learning”)):learing it is the constant value and then it does not declare as any variable so printf statement it contain %d so it will take no of character,no of character 8,but in the string it has null value so no of character 2:so answer is 2

Post a Comment

0 Comments