Technical Questions asked in ITC

  1. What will be the output of the program ?
    int main()
    union a
    int i;
    char ch[2];
    union a u;[0]=6;[1]=7;
    printf("%d\n", u.i);
    return 0;

    The system will allocate 2 bytes to the array

Complete Test Series for Wipro
Bag your Dream Job Today Comprehensive Online Tests Inclusive Prep for All Placement Exams Acquire Essential Domain Skills

  1. Write a program to find factorial of a number.
    int main()
    int x,i,fac;
    printf("input the number whose factorial has to be found");
    scanf("%d", &x);
    for(i=x; i>0,i--)
    fac= fac*i;
    u.i is calculated as
    (6)(7) in binary form which is equal to 1798.
  2. Which of the following is similar to constructor overloading?
    1. Operator overloading
    2. Destructor overloading
    3. Function overloading
    4. None of the above
    Answer: Option  C.
    In function overloading, we will be using the same options availed in constructor overloading.
  3. Which of the following is a branch of polymorphism?
    1. Overloading
    2. Inheritance
    3. Encapsulation
    4. None of these
    Answer: Option  A.
  4. Which of the following is feature of friend classes?
    1. If class A is a friend of class B, class B is not automatically a friend of class A.
    2. If class A is a friend of class B, and class B is a friend of class C, class A is not automatically a friend of class C
    3. None of these
    4. Both (a) and (b)
    Answer: Option  D.
  5. Which of the following access modifiers are not supported by Java?
    1. private
    2. protected
    3. abstract
    4. No-access modifiers
    Answer: Option C

Complete Campus Placement Training Course
Video Lectures Online Tests E-Books & Assignments