logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • Two main measures for the efficiency of an algorithm are


  • Options
  • A. Time and Space
  • B. Complexity and Memory
  • C. Data and Space
  • D. Memory and Processor

  • Correct Answer
  • Time and Space 

    Explanation

    Two main measures for the efficiency of an algorithm are Time and Space.

  • Tags: Database Administrator, IT Trainer

    Programming problems


    Search Results


    • 1. What is Autosys?
    • Discuss
    • 2. What would be the output of the following program? # define SQR(x) (x * x) main() { int a, b = 3; a = SQR ( b + 2 ); Printf ("\n %d ", a ); }
    • Discuss
    • 3. We want to round off x, a Float to an Int value. The correct way to do so would be

    • Options
    • A. Y = ( int ) ( x + 0.5 ) ;
    • B. Y = int ( x + 0.5) ;
    • C. Y = ( int ) x + 0.5;
    • D. Y = ( int ) ( ( int ) x + 0.5 )
    • Discuss
    • 4. What would be the output of the following program? main() { int i = -3, j =2, k =0, m ; m = ++j && ++i || ++k ; Printf ( "\n%d%d%d%d", i , j , k , m ); }
    • Discuss
    • 5. Can you suggest any other way of writing the following expression such that 30 is used only once? a <= 20 ? b = 30 : c = 30 ;
    • Discuss
    • 6. What is math.floor(3.6)?

    • Options
    • A. 6
    • B. 3
    • C. 3.5
    • D. 0.6
    • Discuss
    • 7. What is the output of this C code? #include void main() { int x = 97; char y = x; printf("%cn", y); }

    • Options
    • A. a
    • B. 97
    • C. Run time error
    • D. None
    • Discuss
    • 8. Which of the following is true?

    • Options
    • A. It is appropriate to use assertions to validate arguments to methods marked public
    • B. It is appropriate to catch and handle assertion errors
    • C. It is NOT appropriate to use assertions to validate command-line arguments
    • D. None
    • Discuss
    • 9. Methods declared as what cannot be overriden?

    • Options
    • A. Transcient
    • B. Abstract
    • C. Final
    • D. Super
    • Discuss
    • 10. How would you obtain segment and offset addresses from a far address of a memory location?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment