CS508 Mid term Subjective Paper 2006

CS508 - Modern Programming Languages

Mid Term Examination

Spring 2006 – Session 2
Time Allowed: 90 Minutes
CS508 - Modern Programming Languages - Q. No. 1 M -  2
Ada pointers are called Access types.
TRUE
FALSE

CS508 - Modern Programming Languages - Q. No. 2    M -  10
Give the short answers of the following:
   a) Comparison between functional and imperative languages?
   b)Differentiate between the Dynamic Type binding and Static type binding?

CS508 - Modern Programming Languages - Q. No. 3       M -  15
Convert the following C code into equivalent LISP code using the most appropriate constructs:
switch (VAR) {
       case ‘M’ :
       case ‘P’ :
       case ‘L’ :
       case ‘C’ :
       case ‘S’ :
              cout << “THIS IS A MPL CS COURSE”;
              break;
       case ‘F’ :
       case ‘O’ :
       case ‘L’ :
       case ‘L’ :
       case ‘O’ :
       case ‘W’:
              cout << “FOLLOW”;
              break;
       default:
              cout << “ANY OTHER”;
}           http://www.vuzs.net/study-portals/bscs-study-portal.html
CS508 - Modern Programming Languages - Q. No. 4   M -  2
Dynamic binding occurs at:
Compile Time
Design Time
Link Time
Run Time

CS508 - Modern Programming Languages - Q. No. 5    M -  15
Convert the following Ada code into equivalent C code.
case ch is
       when ‘A’ | ‘E’ | ‘I’ | ‘O’ | ‘U’ =>
            putline(“this is an uppercase vowel”);
      when ‘J’ .. ‘N’ =>
            putline(“between uppercase J and N”);
      when others =>
            putline(“something else”);
end case;
 
CS508 - Modern Programming Languages - Q. No. 6   M -  2
The dangling pointer problem is partially alleviated by Ada design.
TRUE
FALSE
 
CS508 - Modern Programming Languages - Q. No. 7     M -  2
Which statement is wrong about Static variables?
They are bound to memory cells before the execution of program
They use to direct access the memory.
There is run time overhead of allocation and de-allocation of memory.
Storage can’t be shared among variables      
 
CS508 - Modern Programming Languages - Q. No. 8  M -  2
Prolog language falls under the domain of:
Scientific Applications
Business Applications
Special Purpose Languages
None of these

Leave a Reply

Related Posts Plugin for WordPress, Blogger...