logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • How would you eliminate the warning generated on complaining the following program? main() { char far *scr; scr = 0xB8000000; *scr = 'A'; }


  • Correct Answer
  • Use the typecast scr = (char far *) 0xB8000000; 


  • Programming problems


    Search Results


    • 1. Would the following program compile? main() { int a = 10, *j; void *k; J = k = &a; J++; k++; printf ("\n%u %u", j, k); }
    • Discuss
    • 2. What would be the output of the following program, if the array beigns at address 65486? main() { int arr[] = {12,14,15,23,45}; printf ("%u %u", arr, &arr); }
    • Discuss
    • 3. How would you obtain segment and offset addresses from a far address of a memory location?
    • Discuss
    • 4. Methods declared as what cannot be overriden?

    • Options
    • A. Transcient
    • B. Abstract
    • C. Final
    • D. Super
    • Discuss
    • 5. 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
    • 6. What would be the output of the following program? main() { char ch ='A'; printf ("%d%d", sizeof (ch), sizeof ('A')); }
    • Discuss
    • 7. Point out the error, ifany, in the followingb code? typedef struct { int data; NODEPTR link; } *NODEPTR;
    • Discuss
    • 8. If the following structure is written to a file using fwrite(), can fread() read it back successfully? struct emp { char *n; int age; }; struct emp e = { "Sujay",15}; FILE *fp; fwrite (&e, sizeof (e), 1, fp);
    • Discuss
    • 9. What would be the output of the following program? main() { struct emp { char *n; int age; }; struct emp e1 = { "Dravid", 23}; struct emp e2 = e1; strupr (e2.n); printf ("\n%s",e1.n); }
    • Discuss
    • 10. How would you check whether the contents of two structure variables are same or not?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment