QUESTION 1 The statement char ch = ‘A’ would store in ch A. The character A B. ASCII value of A C. A...

60.1K

Verified Solution

Question

Programming

QUESTION 1

  1. The statement char ch = ‘A’ would store inch

    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 acceptfollowing 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\n\", 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

Answer & Explanation Solved by verified expert
4.0 Ratings (512 Votes)
QUESTION 1 The statement char ch A would store in ch A The character A The option A suits well Char data type will store the character value in it So ch will hold the Character A QUESTION 2 Which of the following scanf statement will you use to accept following variables    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students