Feature for accessing a variable through its address is desireable because
A. | call by reference can be simulated |
B. | excessive use of global variables can be avoided |
C. | a function can return more than one value |
D. | All of the above |
Option: D Explanation : Click on Discuss to view users comments. |
It is not advisable to use macros instead of functions because
A. | it increases the code size |
B. | no type checking will be done |
C. | recursion is not possible |
D. | All of the above |
Option: D Explanation : Click on Discuss to view users comments. |
Which of the following is/are syntactically correct?
A. | for ( ) ; |
B. | f or (;) ; |
C. | for ( , ); |
D. | for ( ; ; ) ; |
Option: D Explanation : Click on Discuss to view users comments. Alok Gupta said: (7:00pm on Friday 26th April 2013)
I feel in 'D' option the semi-colon should not be there at the end of parenthesis. It should be like, for (;;) as, if 'D' option is correct then what is wrong with the 'A' and 'C' option.
|
Use of macro instead of function is recommended
A. | when one wants to reduce the execution time |
B. | when there is a loop with a function call inside |
C. | when a function is called in many places in a program |
D. | both (a) and (b) |
Option: D Explanation : Click on Discuss to view users comments. |
A. | Sum:=N+Sum(N) |
B. | Sum:=N+Sum(N-1) |
C. | Sum:=(N-1)+Sum(N+1) |
D. | Sum:=(N-1)+Sum(N-1) |
Option: B Explanation : Click on Discuss to view users comments. |