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;

Download Aptitude Interview Questions And Answers PDF

Previous QuestionNext Question
What is the maximum no. of arguments that can be given in a command line in C?There are two numbers in the ratio 8:9. if the smaller of the two numbers is increased by 12 and the larger number is reduced by 19 thee the ratio of the two numbers is 5:9.
Find the larger number?