Question: QUESTION 1 The statement char ch = A would store in ch A. The character A B. ASCII value of A C. A along with

QUESTION 1

  1. The statement char ch = A would store in ch

    A.

    The character A

    B.

    ASCII value of A

    C.

    A along with the single inverted commas

    D.

    Both (a) and (b)

2 points

QUESTION 2

  1. Which of the following scanf() statement will you use to accept following variables?

    float gravity_a;

    double gravity_b;

    A.

    scanf("%f %lf", &gravity_a, &gravity_b);

    B.

    scanf("%LF %f ", gravity_a, gravity_b);

    C.

    scanf("%LF %LF ", &gravity_a, &gravity_b);

    D.

    scanf("%f %LF ", gravity_a, gravity_b);

2 points (Extra Credit)

QUESTION 3

  1. What will be the output of the following program?

    #include
    int main()
    {
     float a=6.15528;
     printf("%2.1f ", a);
     return 0; }
    A.

    6.00

    B.

    6.15

    C.

    6.2

    D.

    6

2 points (Extra Credit)

QUESTION 4

  1. What will be the output of the following statements?

    const int count = 10;
    count++; printf("%d", count);
    A.

    10

    B.

    11

    C.

    Run-time Error

    D.

    Compile-time Error

3 points

QUESTION 5

  1. What will be the output of the following program?

    #include

    int main()

    {

    int a = 5, b = 2;

    printf("%d ", a+++b);

    printf("%d %d", a, b);

    return 0;

    }

    A.

    Results in Syntax Error

    B.

    Prints 7 6 2

    C.

    Prints 8 6 2

    D.

    None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!