Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 7 What gets printed (if anything) on execution of following C statements? int j = 5 ; ( ! (j != 1) ? printf

QUESTION 7

  1. What gets printed (if anything) on execution of following C statements?

    int j = 5 ;

    ( ! (j != 1) ? printf ( " Today") : printf ( " Exam1") ) ;

    A.

    Today

    B.

    Exam1

    C.

    Compiler-time Error

    D.

    Run-time Error

  2. QUESTION 9

  3. What will be the values of variables x, y, z after following statements are executed in a C Program?

    int x = 7, y = 6, z ;

    z = x-- -y ;

    printf ( " %d %d %d", x, y, z ) ;

    A.

    6 6 0

    B.

    7 6 1

    C.

    6 6 1

    D.

    7 6 0

  4. QUESTION 11

  5. What will be the output of the following code snippet?

    for(;;)

    printf("Hello ");

    A.

    Prints "Hello " infinitely.

    B.

    Prints "Hello " once.

    C.

    No output

    D.

    Compile-time Error

  6. 3 points

    QUESTION 12

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

    #include

    void fun()

    {

    static int i;

    i=0;

    ++i;

    printf("%d",i);

    }

    int main()

    {

    fun();

    fun();

    fun();

    return 0;

    }

    A.

    1 2 3

    B.

    3 2 1

    C.

    1 1 1

    D.

    0 0 0

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

55. For any events A and B with P(B) 0, show that

Answered: 1 week ago