Aptitude Question: Download Questions PDF
What is the o/p of the following C-program?
Main()
{
Char *str[] = { "Frogs"," do", "not", "die", "they", "croak!");
Printf("%d %d",sizeof(str),sizeof(str[0]));
}
Answer:
24,4(in unix)
sizeof(str[0])= storage address=inteter=4bytes;
same as sizeof(str)= storage address of 6 =6*4bytes;
sizeof(str[0])= storage address=inteter=4bytes;
same as sizeof(str)= storage address of 6 =6*4bytes;
Download Aptitude Interview Questions And Answers
PDF