Company: Cisco_MCQ__...
Difficulty: medium
What is the output of the following program: public class test6 { public static void main(String[] args) { Rare rare = new Rare(); System.out.println(rare.callMethod(new Rare())); } } class Tiger { public String callMethod(Tiger obj) { return "Tiger"; } } class White extends Tiger { public String callMethod(White obj) { return "White"; } } class Rare extends White { public String callMethod(Object obj) { return "Rare"; } } Rare White Tiger Program has a compilation Error What will be the output in a 32 bit platform? void foo ( char *p) { printf("[p= %d, *p= %d]", sizeof(p), sizeof(*p)); } main() { foo(0); } [p= 1, *p= 1] Program crash [p= 4, *p= 1] [p= 4, *p= 4] Four jockeys - Alex, Ben, Chris, and Dave - are competing in a horse race. Each jockey rides a horse named after a fruit: Apple, Banana, Orange, and Pear. The race has the following conditions: 1. The jockey riding Banana finishes first. 2. Alex finishes ahead of Chris but behind Dave. 3. Horse names apple run behind Alex. 4. T