Technical Questions asked in Myntra

  1. What will be output of following program?
    #include
    #include
    int main(){
    char far *p,*q;
    printf("%d %d",sizeof(p),sizeof(q));
    return 0;
    }
    1. 2 2
    2. 4 4
    3. 4 2
    4. 2 4
    Answer: Option B
deloitte article
  1. What will be output of following program?
    #include
    #include
    int main(){
    int register a;
    scanf("%d",&a);
    printf("%d",a);
    return 0;
    }
    //if a=25
    1. 25
    2. Address
    3. 0
    4. Compilation error
    Answer: Option D
  2. Mitti wants to find the largest number in a given 20 numbers. Which of the following is an efficient approach to do this?
    1. Use bubble sort to sort the list in descending order and then print the first number of the series.
    2. Use selection sort to sort the list in descending order and then print the first number of the series
    3. Implement one iteration of selection sort for descending order and print the first number in the series.
    4. None of these
    Answer: Option C
  3. What will be output of following program?
    #include
    Int main(int argc, char** argv)
    {
    Int i Var=0,iCnt, 0aiArr[]={56,23,4,89,-200,34};
    For (iCnt=1;iCnt<6;iCnt++)
    {
    If (a I Arr [iCnt] iVar=iCnt;
    }
    printf("%d",iVar);
    return0;
    }
    1. 4
    2. 89
    3. 3
    4. -200

    Answer: Option A
  4. Which of the following is function of relational operator?
    1. It assigns one operand to another.
    2. It compares two operands
    3. It logically combines two operands
    4. None of these
    Answer: Option B
  5. Follow the code snippet and chose the correct statement(s)
    Int x;
    void f2()
    {
    Int x=1; // line1
    ::x=2; // line2
    x=2; //line3
    }
    1. The statement in line1 throws a compilation error
    2. In line2,x=2 is assigned to the global x
    3. In line3,x=2 is assigned to the global x and line2 throws compilation error
    4. Both A and B

    Answer: Option B
Campus Placement ad
Rate Us
Views:8327