IBM -Technical Questions IV

14) 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

Ans) a

Q The very first process created by the kernal that runs

till the kernal process is haltes is

a)init

b)getty

c)

d)

e)none

(Ans is a)



15)which function is the entry point for a DLL in MS Windows 3.1

a) main

b) Winmain

c) Dllmain

d) Libmain

e) None

Ans) b

16)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
ans e

17What 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

Ans) c ( check it )

Comments