You are on page 1of 2

(Please write your Roll No.

immediately)

Roll No. ..................................

FirstFirst-Term Examination
Second Semester [B.Tech] Paper Code : ETCS 108 Subject : PROGRAMMING AND AUTOAUTO-CAD Note : Attempt any 3 questions questions in all.

2. int &r = n++;

u.

1. m = ++n += 2;

in
2 3 2 3 2 2 2 2

Q1 ( a )Find errors with reasons, if any, in the following statements:

variable each time it changes:


int x,y,z; x=y=z=6;

x *= y +=z -= 4;

( d )State the differences between passing parameters by value and passing parameters by reference.

definition?

Q2 ( a )What is the difference between a pointer and a reference variable? ( b )How does main() in C++ differ from the main() in C? ( c ) Write declarations for

( d )What is a dangling pointer? How is it dangerous?

ww

1. A constant pointer to an integer 2. A pointer to a constant integer

w. g

( c ) What is the difference between function declaration and function

gs ip

( b )Trace the following code fragment, showing the value of each

fo

Time : 1:30 Hours

Maximum Marks : 30

( e )State the difference between 'continue' and 'break' statements with example.

Q3 ( a )Write a program to find the transpose of a 2 dimensional square ( b )Explain the coordinate systems of AUTO-CAD Q4 ( a )Use the following relative and absolute coordinate values in LINE POINT 1 2 3 4 COORDINATES POINT 3,3 @3,0 5 6 COORDINATES array of integers.

5 5

for drawing the edges of the object. Command : POLYGON (Enter)

Specify center of polygon or [Edge] : E (Enter) Specify the first end point of edge : 3,6 (Enter)

ww

Specify second end point of edge : 3,2 (Enter)

w. g

Enter number of sides<4> : 8 (Enter)

gs ip

( b )Draw the output of the following command. Also show the direction

@-1.5,-3

u.

@-1.5,3

in
@3,0 @-1.5,3

@3,5

@-1.5,-3

fo

command to draw the object

You might also like