IBM 2012 技术
技术研发 产品
本套题共40题,暂无参考答案
题目详情
第21题

In a square, all the mid points are joined. The inner square is shaded. If the area of the square is A, what is the area of the shaded area?


第22题

Two questions on basic angles i.e given a circle, a few chords or diameter is drawn etc.

12. If the follwoing statements are given

@(a,b)= (a+b)/2

/(a,b)= a/b

*(a,b)= ab

If a=1, b=2 then find

i) /(a,(@(a,b),*(a,b)))

ii) */(a,@(*(a,b))) 16. In UNIX a files i-node ......?



第23题

 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



第24题

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



第25题

 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



第26题

What is the ouptut 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



第27题

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



第28题

Which of the following API is used to hide a window

a) ShowWindow

b) EnableWindow

c) MoveWindow

d) SetWindowPlacement

e) None of the above



第29题

What will the following program do?

void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line number:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); 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



第30题

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



第31题

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

d) Nothing will get printed on screen

e) An error massage will be printed



第32题

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 :Oldstring

c) Run time error/Core dump

d) Syntax error during compilation

e) None of these



第33题

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 : Oldstring

d) Syntax error during compilation

e) None of these



第34题

 Which of the following function is used to repaint a window immediately

a) Sendmessage(hWnd,WM_PAINt,......)

b) InvalidateRect(.......)

c) MoveWindow

d) WM_COPY

e) None



第35题

Which function is the entry point for a DLL in MS Windows 3.1

a) Main

b) Winmain

c) Dllmain

d) Libmain

e) None



第36题

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



第37题

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



第38题

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 characterr & 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 chanage the character

e) None



第39题

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



第40题

The command grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile

b) searches for lines containing the pattern first in the files
second, third, and /usr/you/myfile and prints them

c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them

d) replaces the word first with the word second in the files third and /usr/you/myfile

e) None of the above



共有 40 道题目