Placement Papers: Cadence C Language

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

  1. #define min ( (a) (b) ,) ( (a) < (b) ) (a) ? (b) main () {int i = 0, a [20] ⚹ ptr; ptr = a; while (min (ptr ++ , &a [9] ) < &a [8] ) i = i + 1; printf ( “i =% d⧵n” i) ;} Ans: 5
  2. main () {char a [10] = {1, 2, 3,4, 5,6} ; int x; for (x = 0; x < 4; x ++) {b [x] = x + ‘a’ } printf ( “% s” b) ;} Ans: Abcd56
  3. Linked Lists are preffered than arrays to get advantage while
    1. Insertion
    2. Deletion
    3. Accessing Element
    4. None
  4. ~ (~0 ≪ 8) ? Ans: Last 8 digits are 1՚s rest are 0՚s.
  5. int a, b = 3, c = 2; a = b ++ ⚹ c; c =+ + b ⚹ a; Some thing like this. Print a, b, c? C ++ Language
    1. Virtual Functions in C ++ (Refer to 13th chapter first two examples of LAFORE Book)
    2. Which of the following is not true regarding FRIEND function Ans: If y is friend of x and z is friend of y then z can access private of x.
    3. Given some program on “&” operator overloading.
    4. class X {public: X () {cout ≪ “This is Base” } } ; class Y: Public X {public: Y () {cout ≪ “This is Derived” } } ; what is printed when an object of Y is created?
    5. One question on reference variable in C ++ .

    Ans: &a.

Technical

  1. Number of nodes in Binary tree with height 3 Ans: 7 (Refer to Formula 2 ^ ^ n − 1)
  2. TCP/IP is used in? Ans: LAN/WAN
  3. Host IP Address is? Ans: 32 bits OR 4 bytes.

Developed by: