Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 17 What will be the output of following statements? char a[] = 0; printf(%s, a)? printf(The string is empty ):printf(The string is not empty

QUESTION 17

  1. What will be the output of following statements?

    char a[] = "\0";

    printf("%s", a)? printf("The string is empty "):printf("The string is not empty ");

    A.

    The string is empty

    B.

    The string is not empty

    C.

    Compile-time Error

    D.

    Run-time Error

2 points

QUESTION 18

  1. What will be the output of following statements?

    char str1[] = "Hello";

    char str2[] = "Hello";

    (str1 == str2)? printf("Equal "): printf("Unequal ");

    A.

    Unequal

    B.

    Equal

    C.

    Compile-time Error

    D.

    Run-time Error

2 points

QUESTION 19

  1. What will be the output of following statements?

    char str[] = "Hello";

    char *s = str;

    printf("%s ", s++ +3);

    printf("%s",s);

    A.

    o o

    B.

    lo lo

    C.

    lo ello

    D.

    llo llo

2 points

QUESTION 20

  1. What will be the output of following statement?

    printf(7+"Spring Break! ");

    A.

    Spring Break!

    B.

    Spring

    C.

    B

    D.

    Break!

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions