adplus-dvertising
frame-decoration

Question

Comment on the output of this C code?
#include <stdio.h>
    int const print()
    {
        printf("compscibits.com");
        return 0;
    }
    void main()
    {
        print();
    }

a.

Error because function name cannot be preceded by const

b.

compscibits.com

c.

compscibits.com is printed infinite times

d.

Blank screen, no output

Answer: (b).compscibits.com

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Comment on the output of this C code? #include <stdio.h> int const print() { printf("compscibits.com"); return 0; } void main()...

Similar Questions

Discover Related MCQs

Q. Which of the following declaration is not supported by C?

Q. Which of the following declaration is illegal?

Q. Which keyword is used to prevent any changes in the variable within a C program?

Q. Which of the following is not a pointer declaration?

Q. Which is false ?

Q. A variable declared in a function can be used in main

Q. The name of the variable used in one function cannot be used in another function

Q. The precedence of arithmetic operators is (from highest to lowest)

Q. Which of the following is not an arithmetic operation?

Q. Which of the following data type will throw an error on modulus operation(%)?

Q. Which among the following are the fundamental arithmetic operators, i.e, performing the desired operation can be done using that operator only?

Q. Are logical operators sequence points?

Q. Does logical operators in C language are evaluated with short circuit?

Q. Result of a logical or relational expression in C is

Q. Which among the following is NOT a logical or relational operator?

Q. Relational operators cannot be used on:

Q. When double is converted to float, the value is?

Q. Function tolower(c) defined in library works for

Q. Which type conversion is NOT accepted?

Q. What will be the data type of the result of the following operation?

(float)a * (int)b / (long)c * (double)d