logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • What would be the output of the following program assuming that the array beigns at location 1002? main() { int a[3][4] = { 1 , 2 , 3 , 4 5, 6 , 7, 8 9, 10 , 11, 12 }; Printf ("\n%u %u %u", a[0] + 1, *( a[0] + 1), *( *(a + 0) + 1) ); }


  • Correct Answer
  • 1004 2 2 


  • Programming problems


    Search Results


    • 1. Indicate what would the SWAP macro be expanded to on preprocessing. Would the code compile? #define SWAP (a, b, c ) (c t; t = a, a = b, b = t; ) main() { int x = 10, y = 20; SWAP (x, y, int ); printf ( " %d%d ", x, y); }
    • Discuss
    • 2. Will the following function work? f1 ( int a, int b ) { return ( f2 (20) ); } f2 ( int a ) { return ( a * a ); }
    • Discuss
    • 3. Point out the error, if any, in the following program. main() { int a = 10; void f(); a = f(); printf ( "\n %d", a ); } void f() { printf ( "\n Hi "); }
    • Discuss
    • 4. There is a mistake in the following code. Add a statement in it to remove it. main() { int a; a = f (10, 3.14) ; printf ( " %d ", a ); } f (int aa, float bb) { return ( ( float ) aa + bb ); }
    • Discuss
    • 5. What would be the output of the following program? main() { float a = 0.7; if ( a < 0.7f ) printf ( " C "); else Printf ( " C++ "); }
    • Discuss
    • 6. Undefined reference to 'pthread_create' How to Fix this error?
    • Discuss
    • 7. In HTML, ___________ tag is used to construct drop-down list boxes and scrolling list boxes.

    • Options
    • A.
  • 8. Unreachable code would best be found using

  • Options
  • A. code inspections
  • B. a static analysis tool
  • C. code reviews
  • D. a test management tool
  • Discuss
  • 9. What is "bug leakage?" and what is "bug release?"
  • Discuss
  • 10. main() { float me = 1.1; double you = 1.1; if(me==you) printf("yes"); else printf("No"); }

  • Options
  • A. Yes
  • B. No
  • C. Both
  • D. Compilation error
  • Discuss


Comments

There are no comments.

Enter a new Comment









More in Technical Questions:

DatabaseHardwareNetworkingOperating SystemsProgrammingSoftware Testing