Home / Expert Answers / Computer Science / what-is-the-output-of-the-following-code-fragment-unsigned-char-x-10-x-15-printf-34-d-n-34-x-a-10b-pa962

(Solved): What is the output of the following code fragment?unsigned char x=10;x-=15;printf("%d\n", x);A. 10B. ...



  1. What is the output of the following code fragment?

    unsigned char x=10;
    x-=15;
    printf("%d\n", x);

    A. 10
    B. -15
    C. -5
    D. 15
    E. None of the above

  2. What is the output of the following code fragment?

    short x =-5;
    x*= x-- - ++x + --x;
    printf("%hd\n", x);

    A. 24
    B. -26
    C. 36
    D. -36
    E. None of the above

  3. What is the output of the following code fragment?

    char M[5][10] = {"Final", “Exam”, “262”, “George”, “Mason”};
    printf("%s", M+1+2);

    A. Exam
    B. am
    C. al
    D. George
    E. None of the above

  4. Given the following code, what could be a valid function heading for foo?

    char a[5];
    double num;
    long int x, z;
    int p, b;
    /* … */
    b = foo(a, &p, num, ‘z’);

    A. int foo (char p[], int **a, double z, char num);
    B. int foo(char a, int *p, double num, long int z);
    C. int foo(char a, int p, double num, long int z);
    D. int foo(char a, int *p, double num, int z);
    E. None of the above


We have an Answer from Expert

View Expert Answer

Expert Answer




We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe