C Programming and Technical General Ability General Knowledge

output?
void main()
{
char far *farther,*farthest;
printf("%d..%d",sizeof(farther),sizeof(farthest));
}

A. 4..2

Explanation: The second pointer is of char type and not a far pointer

Read Solution (Total 2)

C Other Question

output??
enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}

Answer: 0..1..2

Explanation: enum assigns numbers starting from 0, if not explicitly defined.
output??
main()
{i
nt i=400,j=300;
printf("%d..%d");
}

A. 400..300

Explanation: printf takes the values of the first two assignments of the program. Any number of printf's may be given. All of them take only the first two values. If more number of assignments given in the program,then printf will take garbage values.