Saturday, 21 November 2015

B.Tech CS PPL 2014 previous year questions Principles of Programming Languages

B.Tech CS PPL 2014 previous year questions ( Principles of Programming Languages )


Q.1 What is the role of parameter passing in subprogram invocations ? Consider following code :

Void swap (int a, int b){
    int temp = a;
    a = b;
    b = temp;
}
void main(){
    int list[5] = {1,3,5,6,10};
    value = 15;
    swap (value,list[0]);
    swap (list[0],list[2]);
    swap (value,list[3]);
}
Consider different methods of parameter passing find the values of variable value and list after each call of swap function.

Q.2 Differentiate between static and dynamic storage management approaches.

View ALL

No comments:

Post a Comment