# Cadence Technical interview questions - Jan 2012

Posted on :13-02-2016
Cadence Placement Paper - Jan 2012:-

Q1. Which of the following sorting procedure is slowest?

a) quick sort
b) heap sort
c) shell sort
d) bubble sort

ANS: d

Q2. What the following program do?

vob (int a ,int b)
{
a=a^b;
b=a^b;
a=a^b;
}
ficssa(int a[], int n)
{
for(int i=0;i for(int j=i+1;j if(a[i]>a[j]) { vob(a[i],a[j]);}
}
}
}

Q3. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is the speed of the stream?

a) 13 km/hr
b) 26 km/hr
c) 34 km/hr
d) None of these

ANS: a

Q4. Which of the following is not provided in C?

a) Test loops
b) Grouping and subprograms
c) Synchronization, co routines and parallel processing
d) All the above

ANS: c

Q5. Find the value of (0.75*0.75*0.75-0.001) / (0.75*0.75-0.75+0.01)

a) 0.845
b) 1.908
c) 2.312
d) 0.001

ANS: a

Q6. What will be the value of x and y after execution of the following statement (C language)

n== 5; x = n++; y = --x;

a) 5,4
b) 6,5
c) 6,6
d) 5,5

Q7. For a 25 MHz processor, what is the time taken by the instruction which needs 3 clock cycles?

a) 120 nano secs
b) 120 micro secs
c) 75 nano secs
d) 75 micro secs

Q8. For program segment given bellow, which of the following is true?

program main(output)
data = record
d : record
end;
begin
new(ptr);
ptr :=nil;
ptr ^.d :=5.2
written(ptr);
end;

a) the program leads to compile time error
b) the program leads to run time error
c) the program produces error relating to nil pointer dereferencing
d) both b and a

Q9. What is the output of the program?

#include
#include
void main()
{
int i,j=20;
clrscr();
for(i=1;i<3;i++)
{
printf(%d,,i);
continue;
printf(%d,j);
break;
}
getch();
}

a) 1,20
b) 1,20,1,20
c) 1,2
d) 1,2,20,20

ANS: c

Q10. What is the output of the program?

void main()
{
int i,j,k;
i=2;
j=4;
k=i++>j&2;
printf(%d ,k);
if(++k && ++i<--j|| i++)
{
j=++k;
}
printf( %d %d %d,i,-j--,k);
getch();
}

a) 4,-3,2
b) 5,-3,2
c) 4,-2,2
d) 5,-2,2

ANS: d

Samsung
Siemens
Bajaj
Maruti
Philips
TVS Motor

Register