Placement Papers - Cisco

Cisco Systems
Latest CISCO Placement Paper (II)
Posted by :
Jammi
(33)
Latest CISCO Placement Paper :



Section B


 1. Given the following statement enum day = { jan = 1 ,feb=4, april, may} What is the value of may?

 (a) 4
 (b) 5
 (c) 6
 (d) 11
 (e) None of the above


 2. Find the output for the following C program

 main
 {int x,j,k;
 j=k=6;x=2;
 x=j*k;
 printf("%d", x);


 3. Find the output for the following C program

 fn f(x)
 { if(x<=0) return;
 else f(x-1)+x;
 }


 4. Find the output for the following C program

 i=20,k=0;
 for(j=1;j {k+=j<10?4:3; }
 printf("%d", k);

 Ans. k=4


 5. Find the output for the following C program

 int i =10
 main()
 {int i =20,n;
 for(n=0;n<=i;) {int i=10;
 i++;
 }
 printf("%d", i);

 Ans. i=20


 6. Find the output for the following C program

 int x=5;
 y= x&y


 7.Find the output for the following C program

 Y=10;
 if( Y++9 && Y++!=10 && Y++10)
 {printf("%d", Y);
 else
 printf("%d", Y);
 }

 Ans. 13


 8. Find the output for the following C program

 f=(xy)?x:y

 a) f points to max of x and y
 b) f points to min of x and y
 c)error

 Ans. (a)


 9. What is the sizeof(long int)

 (a) 4 bytes
 (b) 2 bytes
 (c) compiler dependent
 (d) 8 bytes



 10. Which of the function operator cannot be over loaded

 (a) <= (b) ?:
 (c) ==
 (d) *


 11. Find the output for the following C program

 main()
 {intx=2,y=6,z=6;
 x=y==z;
 printf(%d",x)
 }


 Section C (Programming Skills)

 Answer the questions based on the following program

 STRUCT DOUBLELIST
 { DOUBLE CLINKED
 INT DET; LIST VOID
 STRUCT PREVIOUS; (BE GIVEN AND A PROCEDURE TO
 DELETE)
 STRUCT NEW; (AN ELEMENT WILL BE GIVEN)
 }
 DELETE(STRUCT NODE)
 {NODE-PREV-NEXT NODE-NEXT;
 NODE-NEXT-PREV NODE-PREV;
 IF(NODE==HEAD)
 NODE
 }

 Q. In what case the prev was

 (a) All cases
 (b) It does not work for the last element
 (c) It does not for the first element
 (d) None of these



 Answer the questions based on the following program

 VOID FUNCTION(INT KK)
 {KK+=20;
 }
 VOID FUNCTION (INT K)
 INT MM,N=&M
 KN = K
 KN+-=10;
 }


 Q. What is the output of the following program

 main()
 { int var=25,varp;
 varp=&var;
 varp p = 10;
 fnc(varp)
 printf("%d%d,var,varp);
 }

 (a) 20,55
 (b) 35,35
 (c) 25,25
 (d)55,55




<< Previous | Next >>