Saturday, June 7, 2008

PAPER1

55. Which is said to be a real-time system.?

1. credit card system 2. online flight reservation system

3.bridge control system 4. robotics



56. enum number { a=-1, b= 4,c,d,e}
What is the value of e ?

(a) 7 (b) 4 (c) 5 (d) 15 (e) 3



57. Which of the following API is used to hide a window?

a) Show Window b) Enable Window c) Move Window d) SetWindowPlacement
e) None of the above



58. The UNIX shell ....

a) does not come with the rest of the system
b) forms the interface between the user and the kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
e) all of the above



59. Output of the following program is

main()
{int i=0;
for(i=0;i<20;i++)
{switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);} }

a) 0,5,9,13,17 b) 5,9,13,17 c) 12,17,22 d) 16,21 e) Syntax error



60. What is the output in the following program

main()
{char c=-64; int i=-32
unsigned int u =-16;
if(c > i) { printf("pass1,");
if(c < u) printf("pass2");
else printf("Fail2"); }
else printf("Fail1);
if(i < u) printf("pass2");
else printf("Fail2")
}

a) Pass1,Pass2 b) Pass1,Fail2 c) Fail1,Pass2 d) Fail1,Fail2 e) None of these



61. What will the following program do?

void main()
{int i;
char a[]="String", *p="New String", *Temp;
Temp=a;
a=malloc(strlen(p) + 1); strcpy(a,p);

p = malloc(strlen(Temp) + 1); strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p); free(a);
}

a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1


62. In the following code segment what will be the result of the function,

value of x , value of y
{unsigned int x=-1; int y;
y = ~0;
if(x == y) printf("same");
else printf("not same"); }

a)same, MAXINT, -1 b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1 d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT


63. PATH = /bin : /usr : /your home. The file /bin/calendar has the following line in it

cal 10 1997. The file /yourhome/calender has the following line in it cal 5 1997. If the current directory is /your home and calendar is executed

a) The calendar for May 1997 will be printed on screen
b) The calendar for Oct 1997 will be printed on screen
c) The calendar for the current month( whatever it is) will be printed
d) Nothing will get printed on screen
e) An error massage will be printed



64 The redirection operators > and >>

a) do the same function b) differ : > overwrites, while >> appends
c) differ : > is used for input while >> is used for output
d) differ : > write to any file while >> write only to standard output e) None of these


65. What will be result of the following program?

void myalloc(char *x, int n)
{x= (char *)malloc(n*sizeof(char));
memset(x,\0,n*sizeof(char)); }



main(){char *g="String";
myalloc(g,20);
strcpy(g,"Oldstring");
printf("The string is %s",g); }

a) The string is : String b) Run time error/Core dump c) The string is : Old string
d) Syntax error during compilation e) None of these


66. The standard source for standard input, standard output and standard error is

a) the terminal b) /dev/null
c) /usr/you/input, /usr/you/output/, /usr/you/error respectively d) None


67. What will be the result of the following program?

main()
{char p[]="String";
int x=0;
if(p=="String") {printf("Pass 1");
if(p[sizeof(p)-2]=='g') printf("Pass 2");
else printf("Fail 2"); }
else { printf("Fail 1");
if(p[sizeof(p)-2]=='g') printf("Pass 2");
else printf("Fail 2"); } }

a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2
e) syntax error during compilation


68. Which of the choices is true for the mentioned declaration ?

const char *p; and char * const p;

a) You can't change the character in both
b) First : You can't change the character & Second : You can’t change the pointer
c) You can't change the pointer in both
d) First : You can't change the pointer & Second : You can't change the character
e) None



69. What will be the result of the following program ?

char *gxxx()
{static char xxx[1024]; return xxx; }

main() {char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is : %s",gxxx()); }



a) The string is : string b) The string is :Old string c) Run time error/Core dump
d) Syntax error during compilation e) None of these



Interview:

• What is the most important thing in database design?

• Explain normalization technique as u would explain to a common man?

• What are the steps in SDLC?

• Which is the most important step in SDLC?

• Is documentation a waste of time?

• Draw a flowchart to find a number from an array.

• What is error detection and where will u do it?//CN/CO



• if u get an offer from the 3 top companies which one would u choose? After u joined IBM if u get a better offer from another company what will u do?

• "How do u rate ur self technically on a scale of 5?"

o why 2+2 is 4 why not 5.

• how may stones did hanuman throw on lanka? ( different but of same type)and one more how many trees are there in u'r campus ...

• why IBM and etc .........

part1:

1. 19,24,20,25,21,26,?

2. 11,14,12,15,13,16,?

3. 10,2,8,2,6,2,?

4. 8,9,11,14,,18,23,?

5. 25,25,22,22,19,19,?

6. 14,2,12,4,10,6,?

7. 7,16,9,15,11,14,?

8. 40,42,39,44,38,46,?

9. 3,18,4,24,5,30,?

10. 18,20,22,20,28,20,?

11. 18,20,10,12,4,6?

12. 7,6,8,5,3,7,?

13 9,18,21,25,20,?

14 3,3,4,8,10,36,?

15.30,28,25,20,34,28,?

16. 4,8,16,32,64,128,?

17. 8,16,24,32,40,48,?

18. 13,11,14,12,15,13,?

19. 6,18,36,108,216,648,?

20. 4,4,8,8,16,16,?

21. 2,6,18,54,162,486,?

22. 4,20,35,49,62,74,?

23. 10,18,15,23,20,28,?

24. 4,10,8,14,12,18,?

25 10,15,12,17,14,10,?

No comments: