Technical Questions

Q:

What will be output when you will execute following c code?

#include <stdio.h>
enum actor

{
    SeanPenn=5,
    AlPacino=-2,
    GaryOldman,
    EdNorton
};
void main()

{
     enum actor a=0;
     switch(a)

      {
         case SeanPenn:  printf("Kevin Spacey");
                         break;
         case AlPacino:  printf("Paul Giamatti");
                         break;
         case GaryOldman:printf("Donald Shuterland");
                         break;
         case EdNorton:  printf("Johnny Depp");
      } 
}

A) Kevin Spacey B) Paul Giamatti
C) Donald Shuterland D) Johnny Depp
 
Answer & Explanation Answer: D) Johnny Depp

Explanation:

Default value of enum constant
GaryOldman = -2 +1 = -1
And default value of enum constant
EdNorton = -1 + 1 = 0
Note: Case expression can be enum constant.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

1 13793
Q:

What would be the output of the following program ?

main()

{

     const int x = 5; 

      int *ptrx;

      ptrx = &x;

      *ptr = 10;

       printf ("%d", x);

}

A) 5 B) 10
C) Error D) Garbage value
 
Answer & Explanation Answer: B) 10

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 13759
Q:

Defect Management Process does not include

A) Deliverable base-lining B) Management reporting
C) Defect prevention D) None of above
 
Answer & Explanation Answer: A) Deliverable base-lining

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Software Testing
Job Role: Analyst , IT Trainer

8 13555
Q:

Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?

A) x contains a reference to a Circle object B) You can assign an int value to x
C) x contains an object of the Circle type D) x contains an int value
 
Answer & Explanation Answer: A) x contains a reference to a Circle object

Explanation:
Report Error

View Answer Report Error Discuss

10 13474
Q:

What is "bug leakage?" and what is "bug release?"

Answer

A bug leakage results when a bug is detected which should have been detected in earlier builds/versions of the application.


A defect which exists during testing yet unfound by the tester which is eventually found by the tester/end-user is also called bug leakage.


A bug release is when a particular version of s/w is released with a set of known bug(s)/defect(s). These bugs are usually low severity and/or low priority bugs. It is done when the company can afford the existence of bug in the released s/w rather than the time/cost for fixing it in that particular version. These bugs are usually mentioned in the Release Notes.

Report Error

View answer Workspace Report Error Discuss

Subject: Software Testing

12 13463
Q:

main()

{

float me = 1.1;

double you = 1.1;

if(me==you)

printf("yes");

else

printf("No");

}

A) Yes B) No
C) Both D) Compilation error
 
Answer & Explanation Answer: B) No

Explanation:

For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.

Report Error

View Answer Report Error Discuss

Filed Under: Software Testing
Job Role: Software Architect

10 13071
Q:

What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?

A) Polish B) Reverse Polish
C) Both A and B D) None of the above
 
Answer & Explanation Answer: C) Both A and B

Explanation:

Polish and Reverse Polish are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms

Report Error

View Answer Report Error Discuss

Filed Under: Database
Job Role: Database Administration

10 12947
Q:

If the following program (myprog) is run from the command line as 

myprog 1 2 3 

what would be the output?

main(int argc, char *argv[])

{

    int i, j = 0;

    for (i = 0; i < argc ; i++)

           j = j + atoi ( argv[i]);

    printf ("%d", j);

}

A) 123 B) 6
C) Error D) "123"
 
Answer & Explanation Answer: B) 6

Explanation:

When atoi() tries to convert argv[0] to a number it cannot do so (argv[0] being a file name) and hence returns a zero.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 12909