Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions