Monday 17 August 2015

C language Questions

Dear Reader,

Below are four moderately tough questions picked from diverse topics.

Question 1

Which statement is true about const char* p ?

a) The character pointed by p is constant and not the pointer variable
b) The pointer is constant and not the character pointed by p
c) Both a & b
d) None of these

Answer : a) The character pointed by p is constant and not the pointer variable
Question 2
Which of the following statement is not true about graphicdefaults() ?
a) Viewport is changed to the entire screen.
b) Fill style and pattern are changed to defaut value.
c) Current position is not changed
d) None of these
Answer : c) Current position is not changed
The current position also changes to the default value(0,0)
Question 3
In C graphics, how the programmer can find the driver used ?
Answer :
getdrivername() is used to get the name of the graphics driver. This function returns pointer to the string containing name of the driver used. Using this pointer the name can be printed out.
Question 4
Is it possible to use nested include files ?
Answer :

Yes it is possible using today's compilers.In present day compilers it is implemented by a concept called precompiled headers. Precompiled headers contains all headers and its dependencies in a precompiled state. Thus helps for nesting include files.

No comments:

Post a Comment