IBM之IPAT

发布时间 : 星期日 文章IBM之IPAT更新完毕开始阅读

Ans. Is a data structure that defines all specifications of a file like the file size,

number of lines to a file, permissions etc.

17. The UNIX shell ....

a) does not come with the rest of the system

b) forms the interface between the user and the kernal c) does not give any scope for programming

d) deos not allow calling one program from with in another e) all of the above

Ans. (b)

18. 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

19. The very first process created by the kernal that runs till the kernal process is halts is

a) init b) getty

c) both (a) and (b) d) none of these

Ans. (a)

20. 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(\} }

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

e) Syntax error

Ans. (d)

21. What is the ouptut in the following program

main()

{char c=-64; int i=-32

unsigned int u =-16; if(c>i)

{printf(\if(c

printf(\else

printf(\} else

printf(\if(i

printf(\else

printf(\}

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

Ans. (c)

22. In the process table entry for the kernel process, the process id value is

(a) 0 (b) 1 (c) 2 (d) 255

(e) it does not have a process table entry

Ans. (a)

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

a) ShowWindow b) EnableWindow c) MoveWindow

d) SetWindowPlacement e) None of the above

Ans. (a)

24. What will the following program do?

void main() { int i;

char a[]=\char *p=\char *Temp; Temp=a;

a=malloc(strlen(p) + 1);

strcpy(a,p); //Line number:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp);

printf(\free(p); free(a);

} //Line number 15//

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

Ans. (b)

25. 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(\else

printf(\}

a) same, MAXINT, -1

b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1

d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT

Ans. (a)

26. PATH = /bin : /usr : /yourhome

The file /bin/calender 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 /yourhome and calender 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

联系合同范文客服:xxxxx#qq.com(#替换为@)