Sun Microsystems Interview Questions

Interview Questions Asked in Sun Microsystems
1)How many ways can a thread be used?
2)What is multithread synchronizing ?
3)In which way does a Primitive data type is passed ?
4)What happens when a main method is declared as private?
5)Is there any need to import java.lang package?
6)What is multithread synchronizing ?
7)Find the error in the following program struct point {struct point *next; int data; } x; main() {; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }
8)Which data structure gives efficient search? A. B-tree B. binary tree C. array D. linked list
9)Give the output of the following program main() {char *p='a'; int *i=100/*p; } what will be the value of *i= 1
10)Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");

No comments: