42

 · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: [email protected] Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 2:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 3:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 4:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 5:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 6:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 7:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 8:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

W'l3:4AN: CP 404 (1449)

PROGRAMMING LANGUAGES

Time : Three hours

Maximum Marks : 100

Answer FIVE questions, taking ANY TWO from Group A, ANY TWO from Group B and ALL from Group C.

All parts of a question (a, b, etc. ) should be answered at one place.

Answer should be brief and to-the-point and be supplemented with neat sketches. Unnecessary long answers may

result in loss of marks.

Any missing or wrong data may be assumed suitably giving proper justification.

Figures on the right-hand side margin indicate full marks.

Group A

1. (a) Explain language defmed binding, programmer defmed binding and compiler defmed binding for the following expression :

x=x+5;

(b) Write a program inC or c++ which finds minimum and maximum of an array of 10 integers.

(c) Compare static scope with dynamic scope.

2. (a) Explain concept oflate evaluation in context to call by

7

7

6

name parameter passing technique. 7

(b) Explain the difference between pre-increment and post-increment (i.e.++ X, X++) operators using an appropriate example. 3

Page 9:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

(c) Write a recursive program in LISP to compute factorial of a number. 7

(d) What is the role of a header file inC ? 3

3. (a) Explain the purpose of type declaration of a variable in programming languages like c;c++. 6

(b) InC, declare an array of size 10, each item should be

able to keep track of student information consisting of roll no., name and marks. How will you access marks of 6th student ? 7

(c) What is the role ofLISP in artificial intelligence? 7

4. (a) Compare the concepts of variant record and the union available in programming language C. 3

(b) Write a function inC to swap/exchange contents of two integer variables, and explain which parameter passing technique is used. 7

(c) Explain CAR, CDR and CONS operators to manipulate lists in LISP. 7

(d) Write the low level programming available in C. 3

Group B

5. (a) Compare protected access specifier m c++ with

public and private access specifier. 6

(b) Write a method in c++ for overloading arithmetic

operator + to add two objects of complex class.

Assume that in class named Complex, real and

imaginary parts are stored in integer form. 6

(c) Why is Java called a platform-independent language? 4

(d) Explain the purpose of break and continue programming constructs in Java. 4

6. (a) Explainhowstaticdeclarationofmembervariable of a class effects its internal representation. Explain using

an illustrative example. 7

(b) Explain how polymorphism is realized using virtual function in c+ +. 7

(c) In the following Java statement, explain the significance

of static, void, public, and main ( ) : 6

public void static main ( );

7. (a) Every class/object has member variables and member functions (methods). Does this causes more memory consumption ? Give reasons to explain your answer. 5

(b) Write a template to compare two numbers, considering that number may be integer, real number, complex, etc. 5

(c) Write a method in Java to find the sum and average of

all the numbers in a two-dimensional array. 5

. (a) Mention the name and purpose of any twg of Java

. native classes. 5

8. (a) What is a reference data type? How is it different from a pointer data type ? 4

(b) Explain the role of virtual keyword in a multilevel multiple inheritance inC++. 6

(c) What is meant by namespace ? 4

(d) Explain the terms Event, Event listener, and event driven programming. 3 x 2

Page 10:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

Group C

9. Choose the correct answer for the following:

(i) Constructor is a

(a) variable.

]0 X 2

(b) method with name of class in which it exists.

(c) method which is invoked automatically when the object is destroyed.

(d) keyword.

(ii) How is a class declared as Abstract Class?

(a) Using keyword Abstract before class without semicolon.

(b)' Using virtual fun () = 0, where fun is a user defined function name.

(c) Using protected access specifier before class with semicolon.

(d) None of the three above.

(iii) Structured programming is

(a) goto-less programming.

(b) program with structure using keyword struct.

(c) both (a) and (b) above.

(d) None of the three above.

(iv) Which one of the following ts not a parameter passing technique ? (a) Pass by Value (b) Pass by Result (c) Pass by String

(d) Pass by Copy

( v) In the context of principles of programming language,

short circuit is

(a) a method of creating exception.

(b) an expression evaluation method.

(c) a parameter passing technique.

(d) a recursive declaration.

(vi) A friend function

(a) can access private and public members from

outside the class.

(b) is used for inheritance.

(c) is not possible in C++.

(d) None ofthe three above.

(vii) In C/c++, # define is a

(a) keyword.

(b) reserve word.

(c) I ibrary function.

(d) preprocessor.

( viii)Coersion is

(a) a library function.

(b) implicit-type conversion.

(c) a data type in JAVA.

(d) dynamic memory allocation.

(ix) In C' ' IC, & operator is

(a) bitwise AND.

(h) I value operator.

(c) used for reference type declaration.

(d) All of the three above.

Page 11:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam
Page 12:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: [email protected] Ph: (01332) 266328 Web: www.amiestudycircle.com

Page 13:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: [email protected] Ph: (01332) 266328 Web: www.amiestudycircle.com

Page 14:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: [email protected] Ph: (01332) 266328 Web: www.amiestudycircle.com

Page 15:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: [email protected] Ph: (01332) 266328 Web: www.amiestudycircle.com

Page 16:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 17:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 18:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 19:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 20:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 21:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 22:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 23:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 24:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 25:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 26:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 27:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 28:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 29:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 30:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 31:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 32:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 33:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 34:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 35:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

0

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 36:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 37:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 38:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 39:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 40:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 41:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in

Page 42:  · 2019-07-03 · AMIE(I) STUDY CIRCLE, SECOND FLOOR, SULTAN TOWER, ROORKEE - 247667 (UTTARAKHAND) EMAIL: pcourses@hotmail.com Ph: (01332 ) 266328 Web: JYOTHIS ACADEMY, Kottayam

JYOTHIS ACADEMY, Kottayam Mob 9495951100 www.amieindia.in